Fix unlocked access to vNodes.size() (#1654)
This commit is contained in:
parent
08e503da28
commit
7a8910443c
@ -1170,8 +1170,13 @@ void CConnman::ThreadSocketHandler()
|
||||
}
|
||||
}
|
||||
}
|
||||
if(vNodes.size() != nPrevNodeCount) {
|
||||
nPrevNodeCount = vNodes.size();
|
||||
size_t vNodesSize;
|
||||
{
|
||||
LOCK(cs_vNodes);
|
||||
vNodesSize = vNodes.size();
|
||||
}
|
||||
if(vNodesSize != nPrevNodeCount) {
|
||||
nPrevNodeCount = vNodesSize;
|
||||
if(clientInterface)
|
||||
clientInterface->NotifyNumConnectionsChanged(nPrevNodeCount);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user