Skip to content

Commit 94fd1d8

Browse files
committed
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
1 parent 0d9af79 commit 94fd1d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/netbase.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,8 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials
318318
char pchRet1[2];
319319
if (!InterruptibleRecv(pchRet1, 2, SOCKS5_RECV_TIMEOUT, hSocket)) {
320320
CloseSocket(hSocket);
321-
return error("Error reading proxy response");
321+
LogPrintf("Socks5() connect to %s:%d failed: InterruptibleRecv() timeout or other failure\n", strDest, port);
322+
return false;
322323
}
323324
if (pchRet1[0] != 0x05) {
324325
CloseSocket(hSocket);

0 commit comments

Comments
 (0)