Don't open new connections if have enough (excess == 0)
This commit is contained in:
parent
4b8bd3bf9e
commit
98d06c206b
|
@ -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:
|
||||
|
|
Reference in New Issue
Block a user