ignore unexpected messages
This commit is contained in:
parent
04f035bee5
commit
d3c4d71331
1 changed files with 5 additions and 1 deletions
|
@ -189,7 +189,11 @@ class MeshConsumer(AsyncWebsocketConsumer):
|
||||||
|
|
||||||
await self.log_received_message(src_node, msg)
|
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
|
node_status.last_msg[msg.msg_type] = msg
|
||||||
|
|
||||||
if isinstance(msg, messages.MeshAddDestinationsMessage):
|
if isinstance(msg, messages.MeshAddDestinationsMessage):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue