aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorCory Fields <[email protected]>2017-06-23 12:29:50 -0400
committerCory Fields <[email protected]>2017-09-18 13:47:47 -0400
commit45fd75453e59868471572907db237630ca2b7afd (patch)
tree13b1b423cfb85a7d0c81e1cd087fdbe8cc822cc2 /src/net.cpp
parentnet: separate resolving and conecting (diff)
downloaddiscoin-45fd75453e59868471572907db237630ca2b7afd.tar.xz
discoin-45fd75453e59868471572907db237630ca2b7afd.zip
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.
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/net.cpp b/src/net.cpp
index a9f26fb56..64b8fe726 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1934,11 +1934,9 @@ void CConnman::ThreadOpenAddedConnections()
// the addednodeinfo state might change.
break;
}
- // If strAddedNode is an IP/port, decode it immediately, so
- // OpenNetworkConnection can detect existing connections to that IP/port.
tried = true;
- CService service(LookupNumeric(info.strAddedNode.c_str(), Params().GetDefaultPort()));
- OpenNetworkConnection(CAddress(service, NODE_NONE), false, &grant, info.strAddedNode.c_str(), false, false, true);
+ CAddress addr(CService(), NODE_NONE);
+ OpenNetworkConnection(addr, false, &grant, info.strAddedNode.c_str(), false, false, true);
if (!interruptNet.sleep_for(std::chrono::milliseconds(500)))
return;
}