diff --git a/main.go b/main.go index 9abac3f..f8ea04e 100644 --- a/main.go +++ b/main.go @@ -118,6 +118,7 @@ func setupMQTT() *mqtt.ClientOptions { opts.SetUsername(os.Getenv("MQTTUSER")) opts.SetPassword(os.Getenv("MQTTPASSWORD")) opts.SetClientID("rgbboard") + opts.SetAutoReconnect(true) return opts }