Skip to content

Commit

Permalink
Fix for spamming in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
imbeacon committed Dec 3, 2024
1 parent 2c433a1 commit 4f9a3ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion thingsboard_gateway/connectors/mqtt/mqtt_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,10 @@ def __connect(self):
if not self._connected:
sleep(1)
except (ConnectionRefusedError, ConnectionResetError, ssl.SSLEOFError, socket.timeout) as e:
self.__log.error(e)
self.__log.error("Error while connecting to broker %s: %s", self.get_name(), e)
sleep(10)
except Exception as e:
self.__log.exception("Error while connecting to broker %s: %s", self.get_name(), e)
sleep(10)

def close(self):
Expand Down

0 comments on commit 4f9a3ab

Please sign in to comment.