Ignore heartbeat messages with empty control fields

This commit is contained in:
Ian Gulliver
2020-11-25 16:12:57 -08:00
parent cbc1321019
commit fe565569a1

View File

@@ -43,6 +43,8 @@ while True:
for event in client.events(): for event in client.events():
parsed = json.loads(event.data) parsed = json.loads(event.data)
control = parsed['control'] control = parsed['control']
if control == '':
continue
if control not in ALLOWED_CONTROLS: if control not in ALLOWED_CONTROLS:
print(f'INVALID CONTROL: {control}') print(f'INVALID CONTROL: {control}')
continue continue