From a64ce025bb16d2ab82a2c650db9d5434906dda2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Sat, 9 Mar 2024 22:04:51 -0800 Subject: [PATCH] mqtt: fix will message so it's sent --- mqttcm/mqttcm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mqttcm/mqttcm.go b/mqttcm/mqttcm.go index 2b3319a..eae9227 100644 --- a/mqttcm/mqttcm.go +++ b/mqttcm/mqttcm.go @@ -178,7 +178,7 @@ func Setup(ctx context.Context, name, statusChannel string, subscribe []string, }) } - if len(statusChannel) < 0 { + if len(statusChannel) > 0 { mqttcfg.WillMessage = willMessage mqttcfg.WillProperties = &paho.WillProperties{ WillDelayInterval: paho.Uint32(30),