This commit is contained in:
1
main.go
1
main.go
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user