net: wait until the node is destroyed to delete its recv buffer
when vRecvMsg becomes a private buffer, it won't make sense to allow other threads to mess with it anymore.
This commit is contained in:
parent
f6315e07f9
commit
60425870d7
1 changed files with 0 additions and 5 deletions
|
@ -437,11 +437,6 @@ void CNode::CloseSocketDisconnect()
|
|||
LogPrint("net", "disconnecting peer=%d\n", id);
|
||||
CloseSocket(hSocket);
|
||||
}
|
||||
|
||||
// in case this fails, we'll empty the recv buffer when the CNode is deleted
|
||||
TRY_LOCK(cs_vRecvMsg, lockRecv);
|
||||
if (lockRecv)
|
||||
vRecvMsg.clear();
|
||||
}
|
||||
|
||||
void CConnman::ClearBanned()
|
||||
|
|
Loading…
Reference in a new issue