Skip to content
This repository was archived by the owner on Jul 23, 2021. It is now read-only.
18 changes: 6 additions & 12 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -945,20 +945,14 @@ void SocketSendData(CNode *pnode)
break;
}
} else {
if (nBytes < 0) {
// error
int nErr = WSAGetLastError();
if (nErr != WSAEWOULDBLOCK && nErr != WSAEMSGSIZE && nErr != WSAEINTR && nErr != WSAEINPROGRESS)
{
LogPrintf("socket send error %d\n", nErr);
IdleNodeCheck(pnode);
break;
}
if (nBytes == 0) {
// couldn't send anything at all
LogPrintf("socket send error: data failure\n");
pnode->CloseSocketDisconnect();
break;
}

// couldn't send anything at all
LogPrintf("socket send error: data failure\n");
IdleNodeCheck(pnode);
pnode->CloseSocketDisconnect();
break;
}
}
Expand Down