liuxiulin 4 ماه پیش
والد
کامیت
3a590a0fd8
1فایلهای تغییر یافته به همراه12 افزوده شده و 12 حذف شده
  1. 12 12
      services/emqx-agent/sub_dev.go

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

@@ -138,18 +138,18 @@ func (d *MqttClient) subDevMsg(cli mqtt.Client, handle Handle) error {
 	if err != nil {
 	if err != nil {
 		return err
 		return err
 	}
 	}
-	//err = d.subscribeWithFunc(cli, TopicSDKLog, func(ctx context.Context, topic string, payload []byte) error {
-	//	return handle(ctx).Message(topic, payload)
-	//})
-	//if err != nil {
-	//	return err
-	//}
-	//err = d.subscribeWithFunc(cli, TopicEvent, func(ctx context.Context, topic string, payload []byte) error {
-	//	return handle(ctx).Message(topic, payload)
-	//})
-	//if err != nil {
-	//	return err
-	//}
+	err = d.subscribeWithFunc(cli, TopicSDKLog, func(ctx context.Context, topic string, payload []byte) error {
+		return handle(ctx).Message(topic, payload)
+	})
+	if err != nil {
+		return err
+	}
+	err = d.subscribeWithFunc(cli, TopicEvent, func(ctx context.Context, topic string, payload []byte) error {
+		return handle(ctx).Message(topic, payload)
+	})
+	if err != nil {
+		return err
+	}
 	return nil
 	return nil
 }
 }