Skip to content

Commit

Permalink
Merge pull request #10 from mundschenk-at/retain-discovery
Browse files Browse the repository at this point in the history
Retain discovery topics
  • Loading branch information
erkexzcx committed Jan 13, 2024
2 parents 16dea51 + 8fc5310 commit ffbedf5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/mqtt/producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func produceAnnounceMapTopic(client mqttgo.Client, rmt string, c *config.MQTTCon
panic(err)
}

token := client.Publish(announceTopic, 1, false, announcementData)
token := client.Publish(announceTopic, 1, true, announcementData)
token.Wait()
if token.Error() != nil {
log.Printf("[MQTT producer] Failed to publish: %v\n", token.Error())
Expand Down Expand Up @@ -135,7 +135,7 @@ func producerAnnounceCalibrationTopic(client mqttgo.Client, cdt string, c *confi
panic(err)
}

token := client.Publish(announceTopic, 1, false, announcementData)
token := client.Publish(announceTopic, 1, true, announcementData)
token.Wait()
if token.Error() != nil {
log.Printf("[MQTT producer] Failed to publish: %v\n", token.Error())
Expand Down

0 comments on commit ffbedf5

Please sign in to comment.