Skip to content

Commit

Permalink
Default the new MQTT 'AutoReconnect' to false
Browse files Browse the repository at this point in the history
  • Loading branch information
deadprogram committed Feb 17, 2016
1 parent ac39cfb commit 920c384
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion platforms/mqtt/mqtt_adaptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func (a *MqttAdaptor) Connect() (errs []error) {
if token := a.client.Connect(); token.Wait() && token.Error() != nil {
errs = append(errs, token.Error())
}

return
}

Expand Down Expand Up @@ -71,6 +72,6 @@ func createClientOptions(clientId, raw string) *mqtt.ClientOptions {
opts := mqtt.NewClientOptions()
opts.AddBroker(raw)
opts.SetClientID(clientId)

opts.AutoReconnect = false
return opts
}

0 comments on commit 920c384

Please sign in to comment.