Mqtt: don't set will on empty topic
This commit is contained in:
parent
f4ef8e4081
commit
c7898f06d9
1 changed files with 1 additions and 1 deletions
|
|
@ -610,7 +610,7 @@ func configureMqtt(conf *globalconfig.Mqtt) error {
|
|||
log := util.NewLogger("mqtt")
|
||||
|
||||
instance, err := mqtt.RegisteredClient(log, conf.Broker, conf.User, conf.Password, conf.ClientID, 1, conf.Insecure, conf.CaCert, conf.ClientCert, conf.ClientKey, func(options *paho.ClientOptions) {
|
||||
if !runAsService {
|
||||
if !runAsService || conf.Topic == "" {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue