From edb18eebe0ea2ed1b186840efc726e0bc4d6a8b3 Mon Sep 17 00:00:00 2001 From: Mohammad Mahdi Date: Mon, 29 Sep 2025 16:35:02 +0330 Subject: [PATCH] Fix not re-subscribing to topics on reconnect --- internal/mqtt/mqtt.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/mqtt/mqtt.go b/internal/mqtt/mqtt.go index 2a15055..e24daa8 100644 --- a/internal/mqtt/mqtt.go +++ b/internal/mqtt/mqtt.go @@ -22,6 +22,7 @@ func NewClient(logger *zap.Logger, config *config.Config, csvHelper *csv.Helper) switch n := notification.(type) { case mqtt.ConnectionNotificationConnected: logger.Info("Connected to MQTT broker") + StartListening(logger, config, client) case mqtt.ConnectionNotificationConnecting: logger.Info("connecting", zap.Bool("isReconnect", n.IsReconnect), zap.Int("attempt", n.Attempt)) case mqtt.ConnectionNotificationFailed: