From 81e3eb62d5eb6d565edce2b8e61049532e9a8740 Mon Sep 17 00:00:00 2001 From: imbeacon Date: Wed, 29 May 2024 08:58:04 +0300 Subject: [PATCH] Improvement for stopping in case of first connection failed --- thingsboard_gateway/gateway/tb_gateway_service.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/thingsboard_gateway/gateway/tb_gateway_service.py b/thingsboard_gateway/gateway/tb_gateway_service.py index 95a69011..23841f71 100644 --- a/thingsboard_gateway/gateway/tb_gateway_service.py +++ b/thingsboard_gateway/gateway/tb_gateway_service.py @@ -243,6 +243,8 @@ class TBGatewayService: log.exception(e) self.tb_client.register_service_subscription_callback(self.subscribe_to_required_topics) self.tb_client.connect() + if self.stopped: + return if logging_error is not None: self.tb_client.client.send_telemetry({"ts": time() * 1000, "values": { "LOGS": "Logging loading exception, logs.json is wrong: %s" % (str(logging_error),)}})