We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3033522 commit dfed983Copy full SHA for dfed983
src/net.cpp
@@ -1103,8 +1103,13 @@ void CConnman::ThreadSocketHandler()
1103
}
1104
1105
1106
- if(vNodes.size() != nPrevNodeCount) {
1107
- nPrevNodeCount = vNodes.size();
+ size_t vNodesSize;
+ {
1108
+ LOCK(cs_vNodes);
1109
+ vNodesSize = vNodes.size();
1110
+ }
1111
+ if(vNodesSize != nPrevNodeCount) {
1112
+ nPrevNodeCount = vNodesSize;
1113
if(clientInterface)
1114
clientInterface->NotifyNumConnectionsChanged(nPrevNodeCount);
1115
0 commit comments