Only set disconnected time when it is not already set. Fixes memory leak.

This commit is contained in:
Kyle Agronick 2018-11-27 12:27:44 -05:00
parent de15dcb4d1
commit 44b7115db7

View File

@ -176,7 +176,8 @@ class Server(object):
def protocol_disconnected(self, protocol): def protocol_disconnected(self, protocol):
# Set its disconnected time (the loops will come and clean it up) # Set its disconnected time (the loops will come and clean it up)
self.connections[protocol]["disconnected"] = time.time() if "disconnected" not in self.connections[protocol]:
self.connections[protocol]["disconnected"] = time.time()
### Internal event/message handling ### Internal event/message handling