Skip to content

Commit 224a315

Browse files
authored
Allow to peers behind NAT to get up to preferred_max connections (#2543)
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
1 parent eed8138 commit 224a315

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

servers/src/grin/seed.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ fn listen_for_addrs(
311311
let addrs: Vec<PeerAddr> = rx.try_iter().collect();
312312

313313
// If we have a healthy number of outbound peers then we are done here.
314-
if peers.healthy_peers_mix() {
314+
if peers.peer_count() > peers.peer_outbound_count() && peers.healthy_peers_mix() {
315315
return;
316316
}
317317

0 commit comments

Comments
 (0)