Skip to content

Commit 45fd754

Browse files
committed
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.
1 parent 2416dd7 commit 45fd754

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/net.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,11 +1934,9 @@ void CConnman::ThreadOpenAddedConnections()
19341934
// the addednodeinfo state might change.
19351935
break;
19361936
}
1937-
// If strAddedNode is an IP/port, decode it immediately, so
1938-
// OpenNetworkConnection can detect existing connections to that IP/port.
19391937
tried = true;
1940-
CService service(LookupNumeric(info.strAddedNode.c_str(), Params().GetDefaultPort()));
1941-
OpenNetworkConnection(CAddress(service, NODE_NONE), false, &grant, info.strAddedNode.c_str(), false, false, true);
1938+
CAddress addr(CService(), NODE_NONE);
1939+
OpenNetworkConnection(addr, false, &grant, info.strAddedNode.c_str(), false, false, true);
19421940
if (!interruptNet.sleep_for(std::chrono::milliseconds(500)))
19431941
return;
19441942
}

0 commit comments

Comments
 (0)