mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
[net] SocketHandler: log peer id for close and disconnect
This commit is contained in:
parent
48cb468ce3
commit
04dbdd613f
1 changed files with 4 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue