aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/netbase.cpp')
-rw-r--r--src/netbase.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 88c58f854e..1392fa8233 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -367,13 +367,13 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
int nRet = select(hSocket + 1, NULL, &fdset, NULL, &timeout);
if (nRet == 0)
{
- LogPrint("net", "connection timeout\n");
+ LogPrint("net", "connection to %s timeout\n", addrConnect.ToString().c_str());
closesocket(hSocket);
return false;
}
if (nRet == SOCKET_ERROR)
{
- LogPrintf("select() for connection failed: %i\n",WSAGetLastError());
+ LogPrintf("select() for %s failed: %i\n", addrConnect.ToString().c_str(), WSAGetLastError());
closesocket(hSocket);
return false;
}
@@ -384,13 +384,13 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
if (getsockopt(hSocket, SOL_SOCKET, SO_ERROR, &nRet, &nRetSize) == SOCKET_ERROR)
#endif
{
- LogPrintf("getsockopt() for connection failed: %i\n",WSAGetLastError());
+ LogPrintf("getsockopt() for %s failed: %i\n", addrConnect.ToString().c_str(), WSAGetLastError());
closesocket(hSocket);
return false;
}
if (nRet != 0)
{
- LogPrintf("connect() failed after select(): %s\n",strerror(nRet));
+ LogPrintf("connect() to %s failed after select(): %s\n", addrConnect.ToString().c_str(), strerror(nRet));
closesocket(hSocket);
return false;
}
@@ -401,7 +401,7 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
else
#endif
{
- LogPrintf("connect() failed: %i\n",WSAGetLastError());
+ LogPrintf("connect() to %s failed: %i\n", addrConnect.ToString().c_str(), WSAGetLastError());
closesocket(hSocket);
return false;
}