Set state to "close" and call handle_close() for all connections

This commit is contained in:
Dmitri Bogomolov 2018-01-30 13:55:01 +02:00
parent 25ef9fec51
commit 9e79386595
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

View File

@ -203,6 +203,14 @@ class BMConnectionPool(object):
continue
self.lastSpawned = time.time()
else:
for i in (
self.inboundConnections.values() +
self.outboundConnections.values()
):
i.set_state("close")
# FIXME: rating will be increased after next connection
i.handle_close()
if acceptConnections:
if not self.listeningSockets: