We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f46df5b commit c2a45c2Copy full SHA for c2a45c2
test/test.cc
@@ -1331,6 +1331,27 @@ TEST(RangeTest, FromHTTPBin_Online) {
1331
}
1332
1333
1334
+TEST(GetAddrInfoDanglingRefTest, LongTimeout) {
1335
+ auto host = "unresolvableaddress.local";
1336
+ auto path = std::string{"/"};
1337
+
1338
+#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
1339
+ auto port = 443;
1340
+ SSLClient cli(host, port);
1341
+#else
1342
+ auto port = 80;
1343
+ Client cli(host, port);
1344
+#endif
1345
+ cli.set_connection_timeout(1);
1346
1347
+ {
1348
+ auto res = cli.Get(path);
1349
+ ASSERT_FALSE(res);
1350
+ }
1351
1352
+ std::this_thread::sleep_for(8s);
1353
+}
1354
1355
TEST(ConnectionErrorTest, InvalidHost) {
1356
auto host = "-abcde.com";
1357
0 commit comments