Fix not re-subscribing to topics on reconnect

This commit is contained in:
mahdium committed 2025-09-29 16:36:54 +03:30
1 parent 749ffae0c4
commit edb18eebe0
1 file changed
+1
+1
View File
@@ -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: