Ignore heartbeat messages with empty control fields
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user