Merge #9671: Fix super-unlikely race introduced in 236618061a445d2cb11e72

885cfdd Fix super-unlikely race introduced in 236618061a445d2cb11e72 (Matt Corallo)
This commit is contained in:
Wladimir J. van der Laan 2017-02-04 11:39:12 +01:00 committed by Alexander Block
parent 4f6de16976
commit 2cdafa0ca2

View File

@ -1910,11 +1910,11 @@ bool CConnman::OpenNetworkConnection(const CAddress& addrConnect, bool fCountFai
if (fConnectToMasternode)
pnode->fMasternode = true;
GetNodeSignals().InitializeNode(pnode, *this);
{
LOCK(cs_vNodes);
vNodes.push_back(pnode);
}
GetNodeSignals().InitializeNode(pnode, *this);
return true;
}