fix mqtt by waiting on publish

This commit is contained in:
Martin/Geno 2019-08-07 12:57:20 +02:00
parent 6daba47faf
commit a1604ad527
No known key found for this signature in database
GPG Key ID: 9D7D3C6BFF600C6A
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package mqtt
func (s *Service) HandleSchalterStateChange(open bool) {
s.client.Publish("ccchb/schalter", 0, true, open)
token := s.client.Publish("p5/schalter/state/open", 0, true, open)
token.Wait()
}