aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net.cpp b/src/net.cpp
index c1c70facf4..c0b39925c6 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1361,7 +1361,7 @@ void CConnman::SocketHandler()
{
// socket closed gracefully
if (!pnode->fDisconnect) {
- LogPrint(BCLog::NET, "socket closed\n");
+ LogPrint(BCLog::NET, "socket closed for peer=%d\n", pnode->GetId());
}
pnode->CloseSocketDisconnect();
}
@@ -1371,8 +1371,9 @@ void CConnman::SocketHandler()
int nErr = WSAGetLastError();
if (nErr != WSAEWOULDBLOCK && nErr != WSAEMSGSIZE && nErr != WSAEINTR && nErr != WSAEINPROGRESS)
{
- if (!pnode->fDisconnect)
- LogPrintf("socket recv error %s\n", NetworkErrorString(nErr));
+ if (!pnode->fDisconnect) {
+ LogPrint(BCLog::NET, "socket recv error for peer=%d: %s\n", pnode->GetId(), NetworkErrorString(nErr));
+ }
pnode->CloseSocketDisconnect();
}
}