Skip to content

Commit

Permalink
Log the error on disconnect (if any)
Browse files Browse the repository at this point in the history
  • Loading branch information
carldanley committed Jul 22, 2023
1 parent 889c1eb commit c678a66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/mqtt-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (mc *MQTTClient) getMQTTClient(host string, port int, clientID, username, p
}

func (mc *MQTTClient) OnClientDisconnect(client MQTT.Client, err error) {
mc.Log.Info("Disconnected from MQTT host")
mc.Log.WithError(err).Info("Disconnected from MQTT host")

// cache this new client for later
mc.client = client
Expand Down

0 comments on commit c678a66

Please sign in to comment.