Skip to content

Commit

Permalink
Ensure cs_vNodes is held when using the return value from FindNode
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlueMatt authored and Fuzzbawls committed Sep 2, 2020
1 parent 110a44b commit 07c8d33
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/net.cpp
Expand Up @@ -2293,6 +2293,7 @@ void CConnman::GetNodeStats(std::vector<CNodeStats>& vstats)

bool CConnman::DisconnectNode(const std::string& strNode)
{
LOCK(cs_vNodes);
if (CNode* pnode = FindNode(strNode)) {
pnode->fDisconnect = true;
return true;
Expand Down

0 comments on commit 07c8d33

Please sign in to comment.