Chromium Code Reviews| Index: content/browser/renderer_host/p2p/socket_host_tcp.cc |
| diff --git a/content/browser/renderer_host/p2p/socket_host_tcp.cc b/content/browser/renderer_host/p2p/socket_host_tcp.cc |
| index 99d29ef1edd184ff829e50c53ae74deda1909d6b..c3bfeebfe37c1555b9b256a9aea48eb2c05092b2 100644 |
| --- a/content/browser/renderer_host/p2p/socket_host_tcp.cc |
| +++ b/content/browser/renderer_host/p2p/socket_host_tcp.cc |
| @@ -142,6 +142,7 @@ void P2PSocketHostTcpBase::OnConnected(int result) { |
| DCHECK_NE(result, net::ERR_IO_PENDING); |
| if (result != net::OK) { |
| + LOG(WARNING) << "Error from connecting socket, result=" << result; |
| OnError(); |
| return; |
| } |
| @@ -206,6 +207,7 @@ void P2PSocketHostTcpBase::StartTls() { |
| int status = socket_->Connect( |
| base::Bind(&P2PSocketHostTcpBase::ProcessTlsSslConnectDone, |
| base::Unretained(this))); |
| + |
| if (status != net::ERR_IO_PENDING) { |
| ProcessTlsSslConnectDone(status); |
| } |
| @@ -215,6 +217,7 @@ void P2PSocketHostTcpBase::ProcessTlsSslConnectDone(int status) { |
| DCHECK_NE(status, net::ERR_IO_PENDING); |
| DCHECK_EQ(state_, STATE_TLS_CONNECTING); |
| if (status != net::OK) { |
| + LOG(WARNING) << "Error from connecting TLS socket, status=" << status; |
|
juberti2
2015/03/11 00:59:22
extra space after from
|
| OnError(); |
| return; |
| } |
| @@ -259,17 +262,19 @@ bool P2PSocketHostTcpBase::DoSendSocketCreateMsg() { |
| // |remote_address| could be empty if it is connected through a proxy. |
|
juberti2
2015/03/11 00:59:23
does this comment need an update to discuss NAME_N
|
| result = socket_->GetPeerAddress(&remote_address); |
| - if (result < 0) { |
| + if (result < 0 && result != net::ERR_NAME_NOT_RESOLVED) { |
| LOG(ERROR) << "P2PSocketHostTcpBase::OnConnected: unable to get peer" |
| << " address: " << result; |
| OnError(); |
| return false; |
| } |
| - VLOG(1) << "Remote address: " << remote_address.ToString(); |
| - if (remote_address_.ip_address.address().empty() && |
| - !remote_address.address().empty()) { |
| - // Save |remote_address| if address is empty. |
| - remote_address_.ip_address = remote_address; |
| + |
| + if (!remote_address.address().empty()) { |
|
juberti2
2015/03/11 00:59:22
Should we VLOG to indicate that we can't get a rem
|
| + VLOG(1) << "Remote address: " << remote_address.ToString(); |
| + if (remote_address_.ip_address.address().empty()) { |
| + // Save |remote_address| if address is empty. |
| + remote_address_.ip_address = remote_address; |
| + } |
| } |
| // If we are not doing TLS, we are ready to send data now. |