ignore unexpected messages

This commit is contained in:
Laura Klünder 2023-11-27 22:08:35 +01:00
parent 04f035bee5
commit d3c4d71331

View file

@ -189,7 +189,11 @@ class MeshConsumer(AsyncWebsocketConsumer):
await self.log_received_message(src_node, msg)
node_status = self.dst_nodes[msg.src]
try:
node_status = self.dst_nodes[msg.src]
except KeyError:
print('unexpected message from', msg.src)
return
node_status.last_msg[msg.msg_type] = msg
if isinstance(msg, messages.MeshAddDestinationsMessage):