lijian 2 年 前
コミット
04f8924885
1 ファイル変更1 行追加1 行削除
  1. 1 1
      pkg/ruleEngine/nodes/mqtt_broker_node.go

+ 1 - 1
pkg/ruleEngine/nodes/mqtt_broker_node.go

@@ -120,8 +120,8 @@ func (M *MQTTBrokerNode) OnMessage(ctx ruleEngine.Context, message *protocol.Mes
 		return nil
 		return nil
 	}
 	}
 	topic := stringBuf.String()
 	topic := stringBuf.String()
-	token := M.mqttClient.Publish(topic, 0, false, message.Data)
 	fmt.Printf("+++++++++++++++%v\r\n", M.mqttClient)
 	fmt.Printf("+++++++++++++++%v\r\n", M.mqttClient)
+	token := M.mqttClient.Publish(topic, 0, false, message.Data)
 	if token.Error() != nil {
 	if token.Error() != nil {
 		ctx.TellNext(message, protocol.Failure)
 		ctx.TellNext(message, protocol.Failure)
 	} else {
 	} else {