aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_node.inl
diff options
context:
space:
mode:
Diffstat (limited to 'src/p2p/net_node.inl')
-rw-r--r--src/p2p/net_node.inl10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index a3bc3bf24..872c1a633 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -538,7 +538,7 @@ namespace nodetool
if ( !set_max_out_peers(public_zone, command_line::get_arg(vm, arg_out_peers) ) )
return false;
else
- m_payload_handler.set_max_out_peers(public_zone.m_config.m_net_config.max_out_connection_count);
+ m_payload_handler.set_max_out_peers(epee::net_utils::zone::public_, public_zone.m_config.m_net_config.max_out_connection_count);
if ( !set_max_in_peers(public_zone, command_line::get_arg(vm, arg_in_peers) ) )
@@ -575,6 +575,8 @@ namespace nodetool
if (!set_max_out_peers(zone, proxy.max_connections))
return false;
+ else
+ m_payload_handler.set_max_out_peers(proxy.zone, proxy.max_connections);
epee::byte_slice this_noise = nullptr;
if (proxy.noise)
@@ -2758,7 +2760,7 @@ namespace nodetool
public_zone->second.m_config.m_net_config.max_out_connection_count = count;
if(current > count)
public_zone->second.m_net_server.get_config_object().del_out_connections(current - count);
- m_payload_handler.set_max_out_peers(count);
+ m_payload_handler.set_max_out_peers(epee::net_utils::zone::public_, count);
}
}
@@ -2887,10 +2889,12 @@ namespace nodetool
{
if (m_offline) return true;
if (!m_exclusive_peers.empty()) return true;
- if (m_payload_handler.needs_new_sync_connections()) return true;
for (auto& zone : m_network_zones)
{
+ if (m_payload_handler.needs_new_sync_connections(zone.first))
+ continue;
+
if (zone.second.m_net_server.is_stop_signal_sent())
return false;