From 94fd1d8d53adceb80e5a41cc6438c7704aeac0f7 Mon Sep 17 00:00:00 2001 From: Warren Togami Date: Tue, 17 May 2016 16:43:23 +0900 Subject: [PATCH] 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 --- src/netbase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/netbase.cpp b/src/netbase.cpp index 5ab12c9a7..d2a4188ff 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -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);