Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Unified Diff: webrtc/base/network.cc

Issue 2370383002: Do not spam "Connect failed with 101/65" in logs. (Closed)
Patch Set: Rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/network.cc
diff --git a/webrtc/base/network.cc b/webrtc/base/network.cc
index 36d028b49348e899874296b01646f5017a7043f2..ba056e4635d0be6de427a6203beb6eae3c590a86 100644
--- a/webrtc/base/network.cc
+++ b/webrtc/base/network.cc
@@ -839,7 +839,12 @@ IPAddress BasicNetworkManager::QueryDefaultLocalAddress(int family) const {
if (socket->Connect(SocketAddress(
family == AF_INET ? kPublicIPv4Host : kPublicIPv6Host, kPublicPort)) <
0) {
- LOG(LS_INFO) << "Connect failed with " << socket->GetError();
+ if (socket->GetError() != ENETUNREACH
+ && socket->GetError() != EHOSTUNREACH) {
+ // Ignore the expected case of "host/net unreachable" - which happens if
+ // the network is V4- or V6-only.
+ LOG(LS_INFO) << "Connect failed with " << socket->GetError();
+ }
return IPAddress();
}
return socket->GetLocalAddress().ipaddr();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698