mirror of
https://github.com/django/daphne.git
synced 2024-11-21 23:46:33 +03:00
Don't log discarded old protocol messages as ERROR
This commit is contained in:
parent
382318b6d2
commit
bd03fabce6
|
@ -354,8 +354,13 @@ class HTTPFactory(http.HTTPFactory):
|
|||
return self.reply_protocols.keys()
|
||||
|
||||
def dispatch_reply(self, channel, message):
|
||||
# If we don't know about the channel, ignore it (likely a channel we
|
||||
# used to have that's now in a group).
|
||||
# TODO: Find a better way of alerting people when this happens so
|
||||
# they can do more cleanup, that's not an error.
|
||||
if channel not in self.reply_protocols:
|
||||
raise ValueError("Cannot dispatch message on channel %r (unknown)" % channel)
|
||||
logger.debug("Message on unknown channel %r - discarding" % channel)
|
||||
return
|
||||
|
||||
if isinstance(self.reply_protocols[channel], WebRequest):
|
||||
self.reply_protocols[channel].serverResponse(message)
|
||||
|
|
Loading…
Reference in New Issue
Block a user