mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
net: remove now-superfluous numeric resolve
This was added in order to help OpenNetworkConnection avoid creating a connection that it would end up aborting. It was necessary because resolving was done as part of the connection process. Now that resolving is separated from connecting, this case is detected before the connection is attempted.
This commit is contained in:
parent
2416dd7cc9
commit
45fd75453e
@ -1934,11 +1934,9 @@ void CConnman::ThreadOpenAddedConnections()
|
|||||||
// the addednodeinfo state might change.
|
// the addednodeinfo state might change.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// If strAddedNode is an IP/port, decode it immediately, so
|
|
||||||
// OpenNetworkConnection can detect existing connections to that IP/port.
|
|
||||||
tried = true;
|
tried = true;
|
||||||
CService service(LookupNumeric(info.strAddedNode.c_str(), Params().GetDefaultPort()));
|
CAddress addr(CService(), NODE_NONE);
|
||||||
OpenNetworkConnection(CAddress(service, NODE_NONE), false, &grant, info.strAddedNode.c_str(), false, false, true);
|
OpenNetworkConnection(addr, false, &grant, info.strAddedNode.c_str(), false, false, true);
|
||||||
if (!interruptNet.sleep_for(std::chrono::milliseconds(500)))
|
if (!interruptNet.sleep_for(std::chrono::milliseconds(500)))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user