Make sure content on a send/close is sent before close

This commit is contained in:
Andrew Godwin 2015-09-10 17:41:48 -05:00
parent 3ea2799936
commit aaf2321db1

View File

@ -93,9 +93,9 @@ def get_factory(base):
return self.protocols.keys()
def dispatch_send(self, channel, message):
if message.get("content", None):
self.protocols[channel].serverSend(**message)
if message.get("close", False):
self.protocols[channel].serverClose()
else:
self.protocols[channel].serverSend(**message)
return InterfaceFactory