mirror of
https://github.com/django/daphne.git
synced 2025-07-27 23:49:45 +03:00
Only set disconnected time when it is not already set. Fixes memory leak.
This commit is contained in:
parent
de15dcb4d1
commit
44b7115db7
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user