close handling fix

- don't close a connection twice
This commit is contained in:
Peter Šurda 2017-11-14 23:43:05 +01:00
parent d2f79d3172
commit 1792289e00
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
1 changed files with 1 additions and 1 deletions

View File

@ -236,7 +236,7 @@ class BMConnectionPool(object):
i.append_write_buf(protocol.CreatePacket('ping'))
else:
i.close_reason = "Timeout (%is)" % (time.time() - i.lastTx)
i.handle_close()
i.set_state("close")
for i in self.inboundConnections.values() + self.outboundConnections.values() + self.listeningSockets.values() + self.udpSockets.values():
if i.state == "close":
i.handle_close()