mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-11-24 06:25:47 +00:00
don't set connection loss if termination is in progress (test cases)
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
95642a1c4d
commit
94e3db7d8d
@ -194,9 +194,11 @@ func (mms *MqttMonitor) MqttMsgHandler(_ mqtt.Client, msg mqtt.Message) {
|
||||
func (mms *MqttMonitor) onConnectionLost(_ mqtt.Client, err error) {
|
||||
log.Println("[app] [Monitor] 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()
|
||||
}
|
||||
}
|
||||
|
||||
func (mms *MqttMonitor) MonitorActiveParticipants() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user