mirror of
https://github.com/django/daphne.git
synced 2025-02-16 16:30:33 +03:00
Don't break if protocol is removed before it's put into reply_protocols
This commit is contained in:
parent
8787c1dfe2
commit
eb195c6004
|
@ -230,6 +230,7 @@ class WebSocketProtocol(WebSocketServerProtocol):
|
||||||
Call to clean up this socket after it's closed.
|
Call to clean up this socket after it's closed.
|
||||||
"""
|
"""
|
||||||
if hasattr(self, "reply_channel"):
|
if hasattr(self, "reply_channel"):
|
||||||
|
if self.reply_channel in self.factory.reply_protocols:
|
||||||
del self.factory.reply_protocols[self.reply_channel]
|
del self.factory.reply_protocols[self.reply_channel]
|
||||||
|
|
||||||
def duration(self):
|
def duration(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user