From 37312d701f670b52f796b217adc8726a2a0fa52a Mon Sep 17 00:00:00 2001 From: "wtc@google.com" Date: Thu, 11 Sep 2008 17:03:45 +0000 Subject: Remove all but one place in this file where we return ERR_FAILED. In the remaining place, log the original Win32 error code to help diagnose a failure in the field. R=darin Review URL: http://codereview.chromium.org/1927 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2066 0039d316-1c4b-4281-b951-d872f2087c98 --- net/base/tcp_client_socket.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'net/base') diff --git a/net/base/tcp_client_socket.cc b/net/base/tcp_client_socket.cc index fc65995..d766503 100644 --- a/net/base/tcp_client_socket.cc +++ b/net/base/tcp_client_socket.cc @@ -45,6 +45,7 @@ static int MapWinsockError(DWORD err) { case ERROR_SUCCESS: return OK; default: + LOG(WARNING) << "Unknown error " << err << " mapped to net::ERR_FAILED"; return ERR_FAILED; } } @@ -102,7 +103,7 @@ int TCPClientSocket::Connect(CompletionCallback* callback) { int TCPClientSocket::ReconnectIgnoringLastError(CompletionCallback* callback) { // No ignorable errors! - return ERR_FAILED; + return ERR_UNEXPECTED; } void TCPClientSocket::Disconnect() { @@ -258,7 +259,7 @@ void TCPClientSocket::DidCompleteConnect() { } } else { NOTREACHED(); - result = ERR_FAILED; + result = ERR_UNEXPECTED; } if (result != ERR_IO_PENDING) -- cgit v1.1