Loading DnsProxyListener.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -1159,7 +1159,9 @@ void DnsProxyListener::GetHostByNameHandler::run() { event.set_latency_micros(latencyUs); event.set_event_type(EVENT_GETHOSTBYNAME); LOG(DEBUG) << "GetHostByNameHandler::run: result: " << gai_strerror(rv); if (rv) { LOG(DEBUG) << "GetHostByNameHandler::run: result failed: " << gai_strerror(rv); } bool success = true; if (hp) { Loading Loading @@ -1314,7 +1316,9 @@ void DnsProxyListener::GetHostByAddrHandler::run() { event.set_latency_micros(latencyUs); event.set_event_type(EVENT_GETHOSTBYADDR); LOG(DEBUG) << "GetHostByAddrHandler::run: result: " << gai_strerror(rv); if (rv) { LOG(DEBUG) << "GetHostByAddrHandler::run: result failed: " << gai_strerror(rv); } bool success = true; if (hp) { Loading tests/resolv_private_dns_test.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -974,7 +974,14 @@ TEST_F(PrivateDnsDohTest, ConnectionIdleTimer) { TEST_F(PrivateDnsDohTest, SessionResumption) { const int initial_max_idle_timeout_ms = 1000; for (const auto& flag : {"0", "1"}) { SCOPED_TRACE(fmt::format("flag: {}", flag)); auto sp = make_unique<ScopedSystemProperties>(kDohSessionResumptionFlag, flag); // Each loop takes around 3 seconds, if the system property "doh" is reset in the middle // of the first loop, this test will fail when running the second loop because DnsResolver // updates its "doh" flag when resetNetwork() is called. Therefore, add another // ScopedSystemProperties for "doh" to make the test more robust. auto sp2 = make_unique<ScopedSystemProperties>(kDohFlag, "1"); resetNetwork(); ASSERT_TRUE(doh.stopServer()); Loading Loading
DnsProxyListener.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -1159,7 +1159,9 @@ void DnsProxyListener::GetHostByNameHandler::run() { event.set_latency_micros(latencyUs); event.set_event_type(EVENT_GETHOSTBYNAME); LOG(DEBUG) << "GetHostByNameHandler::run: result: " << gai_strerror(rv); if (rv) { LOG(DEBUG) << "GetHostByNameHandler::run: result failed: " << gai_strerror(rv); } bool success = true; if (hp) { Loading Loading @@ -1314,7 +1316,9 @@ void DnsProxyListener::GetHostByAddrHandler::run() { event.set_latency_micros(latencyUs); event.set_event_type(EVENT_GETHOSTBYADDR); LOG(DEBUG) << "GetHostByAddrHandler::run: result: " << gai_strerror(rv); if (rv) { LOG(DEBUG) << "GetHostByAddrHandler::run: result failed: " << gai_strerror(rv); } bool success = true; if (hp) { Loading
tests/resolv_private_dns_test.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -974,7 +974,14 @@ TEST_F(PrivateDnsDohTest, ConnectionIdleTimer) { TEST_F(PrivateDnsDohTest, SessionResumption) { const int initial_max_idle_timeout_ms = 1000; for (const auto& flag : {"0", "1"}) { SCOPED_TRACE(fmt::format("flag: {}", flag)); auto sp = make_unique<ScopedSystemProperties>(kDohSessionResumptionFlag, flag); // Each loop takes around 3 seconds, if the system property "doh" is reset in the middle // of the first loop, this test will fail when running the second loop because DnsResolver // updates its "doh" flag when resetNetwork() is called. Therefore, add another // ScopedSystemProperties for "doh" to make the test more robust. auto sp2 = make_unique<ScopedSystemProperties>(kDohFlag, "1"); resetNetwork(); ASSERT_TRUE(doh.stopServer()); Loading