mirror of
https://github.com/django/daphne.git
synced 2024-11-21 23:46:33 +03:00
Don't try to send disconnect when we never made an app instance
This commit is contained in:
parent
097f3ba8e8
commit
dd2c8b2a0f
|
@ -142,7 +142,7 @@ class WebSocketProtocol(WebSocketServerProtocol):
|
|||
"""
|
||||
self.server.protocol_disconnected(self)
|
||||
logger.debug("WebSocket closed for %s", self.client_addr)
|
||||
if not self.muted:
|
||||
if not self.muted and hasattr(self, "application_queue"):
|
||||
self.application_queue.put_nowait({
|
||||
"type": "websocket.disconnect",
|
||||
"code": code,
|
||||
|
|
Loading…
Reference in New Issue
Block a user