Fix EventHandlerConnector dying painfully on keyless messages

This commit is contained in:
Kristóf Tóth 2018-03-21 17:23:18 +01:00
parent 095c818a36
commit fda242d263

View File

@ -35,6 +35,5 @@ class EventHandlerConnector(EventHandlerDownlinkConnector, EventHandlerUplinkCon
self._zmq_pull_stream.on_recv(callback)
def send_message(self, message: dict, key: str = None):
if not key:
key = message['key']
if not key: key = message.get('key', '')
self._zmq_pub_socket.send_multipart(serialize_all(key, message))