瀏覽代碼

更新订阅

liuxiulin 4 月之前
父節點
當前提交
05a817b0fa
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      services/emqx-agent/sub_dev.go

+ 5 - 5
services/emqx-agent/sub_dev.go

@@ -97,11 +97,11 @@ func (d *MqttClient) SubDevMsg(handle Handle) error {
 }
 
 func (d *MqttClient) subDevMsg(cli mqtt.Client, handle Handle) error {
-	err := d.subscribeWithFunc(cli, TopicConnectStatus, d.subConnectStatus(handle))
-	if err != nil {
-		return err
-	}
-	err = d.subscribeWithFunc(cli, TopicThing, func(ctx context.Context, topic string, payload []byte) error {
+	//err := d.subscribeWithFunc(cli, TopicConnectStatus, d.subConnectStatus(handle))
+	//if err != nil {
+	//	return err
+	//}
+	err := d.subscribeWithFunc(cli, TopicThing, func(ctx context.Context, topic string, payload []byte) error {
 		return handle(ctx).Message(topic, payload)
 	})
 	if err != nil {