diff options
author | j-berman <justinberman@protonmail.com> | 2022-05-14 20:11:53 -0700 |
---|---|---|
committer | j-berman <justinberman@protonmail.com> | 2022-05-18 09:54:21 -0700 |
commit | 2dab31f62f3e7aff14afd7897848143456b0c47d (patch) | |
tree | 287695d6bf95c26a9bc9e394b6fb96f0d42e8d70 /src/p2p/net_node.inl | |
parent | Merge pull request #8321 (diff) | |
download | monero-2dab31f62f3e7aff14afd7897848143456b0c47d.tar.xz |
Don't exclusively drop tor/i2p outgoing cxns in idle loop
Diffstat (limited to '')
-rw-r--r-- | src/p2p/net_node.inl | 10 |
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; |