diff --git a/src/net.cpp b/src/net.cpp index f65729d7a..28dbc0850 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -429,15 +429,15 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest, bool fConnectToMas // Add node CNode* pnode = new CNode(hSocket, addrConnect, pszDest ? pszDest : "", false, true); - LOCK(cs_vNodes); - vNodes.push_back(pnode); - pnode->nTimeConnected = GetTime(); if(fConnectToMasternode) { pnode->AddRef(); pnode->fMasternode = true; } + LOCK(cs_vNodes); + vNodes.push_back(pnode); + return pnode; } else if (!proxyConnectionFailed) { // If connecting to the node failed, and failure is not caused by a problem connecting to