Browse Source

Make Socks5() InterruptibleRecv() timeout/failures informative.

Before:
2016-05-16 06:10:45 ERROR: Error reading proxy response

After:
2016-05-16 06:10:45 Socks5() connect to k7s5d6jqig4ej4v4.onion:18333 failed: InterruptibleRecv() timeout or other failure
0.13
Warren Togami 8 years ago
parent
commit
94fd1d8d53
  1. 3
      src/netbase.cpp

3
src/netbase.cpp

@ -318,7 +318,8 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials @@ -318,7 +318,8 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials
char pchRet1[2];
if (!InterruptibleRecv(pchRet1, 2, SOCKS5_RECV_TIMEOUT, hSocket)) {
CloseSocket(hSocket);
return error("Error reading proxy response");
LogPrintf("Socks5() connect to %s:%d failed: InterruptibleRecv() timeout or other failure\n", strDest, port);
return false;
}
if (pchRet1[0] != 0x05) {
CloseSocket(hSocket);

Loading…
Cancel
Save