lijian 2 år sedan
förälder
incheckning
5d3886d3fd
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      pkg/ruleEngine/nodes/mqtt_broker_node.go

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

@@ -88,7 +88,6 @@ func (M *MQTTBrokerNode) Init(ctx ruleEngine.Context, config string) error {
 	M.mqttClient = c
 	go func() {
 		if token := c.Connect(); token.Wait() && token.Error() != nil {
-			fmt.Println(token.Error().Error())
 			return
 		}
 	}()
@@ -122,6 +121,7 @@ func (M *MQTTBrokerNode) OnMessage(ctx ruleEngine.Context, message *protocol.Mes
 	}
 	topic := stringBuf.String()
 	token := M.mqttClient.Publish(topic, 0, false, message.Data)
+	fmt.Printf("+++++++++++++++%v\r\n", M.mqttClient)
 	if token.Error() != nil {
 		ctx.TellNext(message, protocol.Failure)
 	} else {