Skip to content

Commit

Permalink
Allow to peers behind NAT to get up to preferred_max connections (#2543)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hashmap authored Feb 25, 2019
1 parent eed8138 commit 224a315
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion servers/src/grin/seed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 224a315

Please sign in to comment.