diff options
author | luigi1111 <luigi1111w@gmail.com> | 2019-08-15 17:22:39 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2019-08-15 17:22:39 -0500 |
commit | 8a0711f2f24ddec34e2cb7031b693857602e0bd5 (patch) | |
tree | dca3c3ad36e396bb4e087a786ed5524467ad12f4 /src/p2p | |
parent | Merge pull request #5673 (diff) | |
parent | p2p: close the right number of connections on setting max in/out peers (diff) | |
download | monero-8a0711f2f24ddec34e2cb7031b693857602e0bd5.tar.xz |
Merge pull request #5674
fcbf7b3 p2p: propagate out peers limit to payload handler (moneromooo-monero)
098aadf p2p: close the right number of connections on setting max in/out peers (moneromooo-monero)
Diffstat (limited to 'src/p2p')
-rw-r--r-- | src/p2p/net_node.inl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index 426767365..00467132a 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -2432,10 +2432,11 @@ 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); + m_payload_handler.set_max_out_peers(count); } } @@ -2454,7 +2455,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); |