File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -3454,13 +3454,12 @@ void CConnman::ThreadOpenMasternodeConnections(CDeterministicMNManager& dmnman,
34543454 // Check if we should connect to this masternode
34553455 // We already hold m_nodes_mutex here, so check m_masternode_connection directly
34563456 if (dmn && !connectedNodes.count (dmn->pdmnState ->netInfo ->GetPrimary ())) {
3457- if (const CNode* pnode = FindNode (dmn->pdmnState ->netInfo ->GetPrimary ())) {
3458- if (!pnode->m_masternode_connection ) {
3459- LogPrint (BCLog::NET_NETCONN, " CConnman::%s -- opening pending masternode connection to %s, service=%s\n " ,
3460- _func_, dmn->proTxHash .ToString (),
3461- dmn->pdmnState ->netInfo ->GetPrimary ().ToStringAddrPort ());
3462- return dmn;
3463- }
3457+ const CNode* pnode = FindNode (dmn->pdmnState ->netInfo ->GetPrimary (), /* fExcludeDisconnecting=*/ false );
3458+ if (pnode == nullptr || (!pnode->m_masternode_connection && !pnode->fDisconnect )) {
3459+ LogPrint (BCLog::NET_NETCONN, " CConnman::%s -- opening pending masternode connection to %s, service=%s\n " ,
3460+ _func_, dmn->proTxHash .ToString (),
3461+ dmn->pdmnState ->netInfo ->GetPrimary ().ToStringAddrPort ());
3462+ return dmn;
34643463 }
34653464 }
34663465 }
You can’t perform that action at this time.
0 commit comments