Permalink
Browse files

Use bound connection if exists in p2p

  • Loading branch information...
miltonf committed Nov 24, 2018
1 parent a84e4af commit 2cfa6acb8c2b32409744bf98f1b603249480ca76
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/p2p/net_node.inl
@@ -912,7 +912,7 @@ namespace nodetool
bool res = m_net_server.connect(epee::string_tools::get_ip_string_from_int32(ipv4.ip()),
epee::string_tools::num_to_string_fast(ipv4.port()),
m_config.m_net_config.connection_timeout,
con);
con, m_bind_ip.empty() ? "0.0.0.0" : m_bind_ip);

if(!res)
{
@@ -977,7 +977,7 @@ namespace nodetool
bool res = m_net_server.connect(epee::string_tools::get_ip_string_from_int32(ipv4.ip()),
epee::string_tools::num_to_string_fast(ipv4.port()),
m_config.m_net_config.connection_timeout,
con);
con, m_bind_ip.empty() ? "0.0.0.0" : m_bind_ip);

if (!res) {
bool is_priority = is_priority_node(na);
@@ -1573,7 +1573,7 @@ namespace nodetool
return false;
}
return true;
});
}, m_bind_ip.empty() ? "0.0.0.0" : m_bind_ip);
if(!r)
{
LOG_WARNING_CC(context, "Failed to call connect_async, network error.");

0 comments on commit 2cfa6ac

Please sign in to comment.