From 098aadf084ad0ab0584e92e8f2bc5667b7cd5c89 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 18 Jun 2019 22:47:05 +0000 Subject: p2p: close the right number of connections on setting max in/out peers --- src/p2p/net_node.inl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/p2p/net_node.inl') diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index 5280e777c..9f5f874c2 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -2209,7 +2209,7 @@ namespace nodetool auto public_zone = m_network_zones.find(epee::net_utils::zone::public_); if (public_zone != m_network_zones.end()) { - const auto current = public_zone->second.m_config.m_net_config.max_out_connection_count; + const auto current = public_zone->second.m_net_server.get_config_object().get_out_connections_count(); 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); @@ -2223,7 +2223,7 @@ namespace nodetool auto public_zone = m_network_zones.find(epee::net_utils::zone::public_); if (public_zone != m_network_zones.end()) { - const auto current = public_zone->second.m_config.m_net_config.max_in_connection_count; + const auto current = public_zone->second.m_net_server.get_config_object().get_in_connections_count(); public_zone->second.m_config.m_net_config.max_in_connection_count = count; if(current > count) public_zone->second.m_net_server.get_config_object().del_in_connections(current - count); -- cgit v1.2.3