Browse Source

Fix unlocked access to vNodes.size()

0.14
Matt Corallo 8 years ago
parent
commit
dfed983f19
  1. 9
      src/net.cpp

9
src/net.cpp

@ -1103,8 +1103,13 @@ void CConnman::ThreadSocketHandler() @@ -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…
Cancel
Save