mirror of
https://github.com/django/daphne.git
synced 2025-07-13 09:22:17 +03:00
Make sure content on a send/close is sent before close
This commit is contained in:
parent
3ea2799936
commit
aaf2321db1
|
@ -93,9 +93,9 @@ def get_factory(base):
|
||||||
return self.protocols.keys()
|
return self.protocols.keys()
|
||||||
|
|
||||||
def dispatch_send(self, channel, message):
|
def dispatch_send(self, channel, message):
|
||||||
|
if message.get("content", None):
|
||||||
|
self.protocols[channel].serverSend(**message)
|
||||||
if message.get("close", False):
|
if message.get("close", False):
|
||||||
self.protocols[channel].serverClose()
|
self.protocols[channel].serverClose()
|
||||||
else:
|
|
||||||
self.protocols[channel].serverSend(**message)
|
|
||||||
|
|
||||||
return InterfaceFactory
|
return InterfaceFactory
|
||||||
|
|
Loading…
Reference in New Issue
Block a user