Skip to content

Commit

Permalink
using the defined function
Browse files Browse the repository at this point in the history
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
  • Loading branch information
eckelj committed Nov 18, 2024
1 parent b48432f commit cf6591a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions monitor/mqtt_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,7 @@ func (mms *MqttMonitor) onConnectionLost(_ mqtt.Client, err error) {
Log("connection lost: " + err.Error())
// Handle connection loss here (e.g., reconnect attempts, logging)
if !mms.IsTerminated() {
mms.lostConnectionMutex.Lock()
mms.lostConnection = true
mms.lostConnectionMutex.Unlock()
mms.setConnectionStatus(true)
}
}

Expand Down

0 comments on commit cf6591a

Please sign in to comment.