mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Fix unlocked access to vNodes.size()
This commit is contained in:
parent
303352286f
commit
dfed983f19
@ -1103,8 +1103,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