Allow to peers behind NAT to get up to preferred_max connections
Allow to peers behind NAT to get up to preffered_max connections
If peer has only outbound connections it's mot likely behind NAT and we should not stop it from getting more outbound connections
@@ -311,7 +311,7 @@ fn listen_for_addrs(
let addrs: Vec<PeerAddr> = rx.try_iter().collect();
// If we have a healthy number of outbound peers then we are done here.
- if peers.healthy_peers_mix() {
+ if peers.peer_count() > peers.peer_outbound_count() && peers.healthy_peers_mix() {
return;
}
