Mqtt: fix panic
This commit is contained in:
parent
abb79e4b75
commit
52bbc4e5b3
1 changed files with 2 additions and 2 deletions
|
|
@ -450,8 +450,8 @@ func configureMQTT(conf mqttConfig) error {
|
|||
|
||||
oc := options.OnConnect
|
||||
options.SetOnConnectHandler(func(client paho.Client) {
|
||||
oc(client) // original handler
|
||||
_ = mqtt.Instance.Publish(topic, true, "online") // alive
|
||||
oc(client) // original handler
|
||||
_ = client.Publish(topic, 1, true, "online") // alive - not logged
|
||||
})
|
||||
})
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue