mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
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
@ -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 New Issue
Block a user