baishaojie 2 долоо хоног өмнө
parent
commit
6de7d7a877

+ 1 - 1
http/handle/api/mqtt.go

@@ -365,7 +365,7 @@ func dustingPush(c MQTT.Client, pubTopic, date string) {
 	if len(dataList) > 0 {
 		b, _ := json.Marshal(dataList)
 		pushStr = fmt.Sprintf(pushStr, setting.YynserverSetting.FarmId, len(dataList), string(b))
-		 c.Publish(pubTopic, 2, false, pushStr)
+		token :=  c.Publish(pubTopic, 2, false, pushStr)
 		fmt.Println("publish msg: ", pushStr, token.Error())
 		// token.Wait()
 		// time.Sleep(2 * time.Second)

BIN
tmr-watch.exe