From 224a315dd1b2c46a352d546405ccac80b7bf49cb Mon Sep 17 00:00:00 2001 From: hashmap Date: Mon, 25 Feb 2019 16:29:37 +0100 Subject: [PATCH] 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 --- servers/src/grin/seed.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/src/grin/seed.rs b/servers/src/grin/seed.rs index dd6f2d134..456d0e8b1 100644 --- a/servers/src/grin/seed.rs +++ b/servers/src/grin/seed.rs @@ -311,7 +311,7 @@ fn listen_for_addrs( let addrs: Vec = 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; }