close handling fix
- don't close a connection twice
This commit is contained in:
parent
d2f79d3172
commit
1792289e00
|
@ -236,7 +236,7 @@ class BMConnectionPool(object):
|
||||||
i.append_write_buf(protocol.CreatePacket('ping'))
|
i.append_write_buf(protocol.CreatePacket('ping'))
|
||||||
else:
|
else:
|
||||||
i.close_reason = "Timeout (%is)" % (time.time() - i.lastTx)
|
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():
|
for i in self.inboundConnections.values() + self.outboundConnections.values() + self.listeningSockets.values() + self.udpSockets.values():
|
||||||
if i.state == "close":
|
if i.state == "close":
|
||||||
i.handle_close()
|
i.handle_close()
|
||||||
|
|
Reference in New Issue
Block a user