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

Side by Side Diff: webrtc/base/network.cc

Issue 2370383002: Do not spam "Connect failed with 101/65" in logs. (Closed)
Patch Set: Rebase Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 std::unique_ptr<AsyncSocket> socket( 832 std::unique_ptr<AsyncSocket> socket(
833 thread_->socketserver()->CreateAsyncSocket(family, SOCK_DGRAM)); 833 thread_->socketserver()->CreateAsyncSocket(family, SOCK_DGRAM));
834 if (!socket) { 834 if (!socket) {
835 LOG_ERR(LERROR) << "Socket creation failed"; 835 LOG_ERR(LERROR) << "Socket creation failed";
836 return IPAddress(); 836 return IPAddress();
837 } 837 }
838 838
839 if (socket->Connect(SocketAddress( 839 if (socket->Connect(SocketAddress(
840 family == AF_INET ? kPublicIPv4Host : kPublicIPv6Host, kPublicPort)) < 840 family == AF_INET ? kPublicIPv4Host : kPublicIPv6Host, kPublicPort)) <
841 0) { 841 0) {
842 LOG(LS_INFO) << "Connect failed with " << socket->GetError(); 842 if (socket->GetError() != ENETUNREACH
843 && socket->GetError() != EHOSTUNREACH) {
844 // Ignore the expected case of "host/net unreachable" - which happens if
845 // the network is V4- or V6-only.
846 LOG(LS_INFO) << "Connect failed with " << socket->GetError();
847 }
843 return IPAddress(); 848 return IPAddress();
844 } 849 }
845 return socket->GetLocalAddress().ipaddr(); 850 return socket->GetLocalAddress().ipaddr();
846 } 851 }
847 852
848 void BasicNetworkManager::UpdateNetworksOnce() { 853 void BasicNetworkManager::UpdateNetworksOnce() {
849 if (!start_count_) 854 if (!start_count_)
850 return; 855 return;
851 856
852 ASSERT(Thread::Current() == thread_); 857 ASSERT(Thread::Current() == thread_);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 std::stringstream ss; 981 std::stringstream ss;
977 // Print out the first space-terminated token of the network desc, plus 982 // Print out the first space-terminated token of the network desc, plus
978 // the IP address. 983 // the IP address.
979 ss << "Net[" << description_.substr(0, description_.find(' ')) 984 ss << "Net[" << description_.substr(0, description_.find(' '))
980 << ":" << prefix_.ToSensitiveString() << "/" << prefix_length_ 985 << ":" << prefix_.ToSensitiveString() << "/" << prefix_length_
981 << ":" << AdapterTypeToString(type_) << "]"; 986 << ":" << AdapterTypeToString(type_) << "]";
982 return ss.str(); 987 return ss.str();
983 } 988 }
984 989
985 } // namespace rtc 990 } // namespace rtc
OLDNEW
« 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