From 7c0a50461631fb7c100151b035ac0fd766525a9f Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Tue, 11 Aug 2026 19:58:33 -0500 Subject: [PATCH] fix lock releasing in mqtt client on error --- internal/module/mqtt-client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/module/mqtt-client.go b/internal/module/mqtt-client.go index 081185b..728b075 100644 --- a/internal/module/mqtt-client.go +++ b/internal/module/mqtt-client.go @@ -148,13 +148,13 @@ func (mc *MQTTClient) Start(ctx context.Context, inputHandler common.InputHandle mc.client = mqtt.NewClient(opts) token := mc.client.Connect() + mc.clientMu.Unlock() token.Wait() err := token.Error() if err != nil { return err } - mc.clientMu.Unlock() <-mc.ctx.Done() mc.logger.Debug("done")