mirror of
https://github.com/django/daphne.git
synced 2025-06-28 17:03:03 +03:00
Don't keep doing keepalives if main loop dies
This commit is contained in:
parent
b9f07475b7
commit
c937c4da6d
|
@ -66,4 +66,5 @@ class WebsocketAsyncioInterface(object):
|
||||||
for protocol in self.factory.protocols.values():
|
for protocol in self.factory.protocols.values():
|
||||||
if time.time() - protocol.last_keepalive > expiry_window:
|
if time.time() - protocol.last_keepalive > expiry_window:
|
||||||
protocol.sendKeepalive()
|
protocol.sendKeepalive()
|
||||||
self.loop.call_later(1, self.keepalive_sender)
|
if self.loop.is_running():
|
||||||
|
self.loop.call_later(1, self.keepalive_sender)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user