diff --git a/arena/arena_mqtt.py b/arena/arena_mqtt.py index 5300fd24..cbb28fa2 100644 --- a/arena/arena_mqtt.py +++ b/arena/arena_mqtt.py @@ -264,6 +264,7 @@ def on_connect(self, client, userdata, flags, rc): else: print(f"Connection error! Result code={rc}") + os._exit(1) def on_message(self, client, userdata, msg): # ignore own messages @@ -281,6 +282,8 @@ def on_disconnect(self, client, userdata, rc): else: print(f"Disconnected! Result code={rc}.") + os._exit(rc) + def disconnect(self): """Disconnects Paho MQTT client""" if self.end_program_callback: