Mqtt: empty topic disables publishing
This commit is contained in:
parent
6aa8e31167
commit
f4ef8e4081
1 changed files with 1 additions and 1 deletions
|
|
@ -230,7 +230,7 @@ func runRoot(cmd *cobra.Command, args []string) {
|
|||
valueChan <- util.Param{Key: keys.Startup, Val: true}
|
||||
|
||||
// setup mqtt publisher
|
||||
if err == nil && conf.Mqtt.Broker != "" {
|
||||
if err == nil && conf.Mqtt.Broker != "" && conf.Mqtt.Topic != "" {
|
||||
var mqtt *server.MQTT
|
||||
mqtt, err = server.NewMQTT(strings.Trim(conf.Mqtt.Topic, "/"), site)
|
||||
if err == nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue