Ensure CNode::addrKnown immediately takes little memory when we disconnect the node
This commit is contained in:
@@ -556,6 +556,10 @@ void CNode::CloseSocketDisconnect()
|
||||
CloseSocket(hSocket);
|
||||
}
|
||||
}
|
||||
{
|
||||
LOCK(cs_addrKnown);
|
||||
addrKnown.reset();
|
||||
}
|
||||
|
||||
// in case this fails, we'll empty the recv buffer when the CNode is deleted
|
||||
TRY_LOCK(cs_vRecvMsg, lockRecv);
|
||||
|
||||
Reference in New Issue
Block a user