From 98d06c206bf4deb66b66ae2d6338fa0438e8ef69 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Mon, 31 May 2021 23:28:39 +0300 Subject: [PATCH] Don't open new connections if have enough (excess == 0) --- src/network/connectionpool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/connectionpool.py b/src/network/connectionpool.py index 4781adf0..8d46580a 100644 --- a/src/network/connectionpool.py +++ b/src/network/connectionpool.py @@ -290,7 +290,7 @@ class BMConnectionPool(object): pending = len(self.outboundConnections) - established_num excess = established_num - BMConfigParser().safeGetInt( 'bitmessagesettings', 'maxoutboundconnections') - if excess > 0: + if excess >= 0: for _ in range(excess): established.pop().handle_close() else: