mirror of
https://github.com/django/daphne.git
synced 2024-11-22 07:56:34 +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,7 +230,8 @@ class WebSocketProtocol(WebSocketServerProtocol):
|
|||
Call to clean up this socket after it's closed.
|
||||
"""
|
||||
if hasattr(self, "reply_channel"):
|
||||
del self.factory.reply_protocols[self.reply_channel]
|
||||
if self.reply_channel in self.factory.reply_protocols:
|
||||
del self.factory.reply_protocols[self.reply_channel]
|
||||
|
||||
def duration(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user