Skip to content

Commit

Permalink
fix: consistent error logging to mqtt connection issues (#1578)
Browse files Browse the repository at this point in the history
  • Loading branch information
onedr0p authored Aug 24, 2021
1 parent 29de723 commit 10ab700
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frigate/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ def on_connect(client, userdata, flags, rc):
threading.current_thread().name = "mqtt"
if rc != 0:
if rc == 3:
logger.error("MQTT Server unavailable")
logger.error("Unable to connect to MQTT server: MQTT Server unavailable")
elif rc == 4:
logger.error("MQTT Bad username or password")
logger.error("Unable to connect to MQTT server: MQTT Bad username or password")
elif rc == 5:
logger.error("MQTT Not authorized")
logger.error("Unable to connect to MQTT server: MQTT Not authorized")
else:
logger.error(
"Unable to connect to MQTT: Connection refused. Error code: "
"Unable to connect to MQTT server: Connection refused. Error code: "
+ str(rc)
)

Expand Down

0 comments on commit 10ab700

Please sign in to comment.