adding resources
All checks were successful
rgb/pipeline/head This commit looks good

This commit is contained in:
Nathan
2023-01-15 03:22:53 +00:00
parent 63dbb2fb4d
commit 7872195d61
2 changed files with 3 additions and 2 deletions

View File

@@ -80,6 +80,7 @@ func listener(mqMessages chan mqtt.Message) {
client := MQTT.NewClient(opts)
topic := "home/rgbboard"
if token := client.Connect(); token.Wait() && token.Error() != nil {
log.Println(fmt.Sprintf("failed to connect to mq: %s", token.Error().Error()))
panic(token.Error())
}
client.Subscribe(topic, 0, func(client mqtt.Client, msg mqtt.Message) {