【fix】修复设置属性,指令下发,单双向

This commit is contained in:
PandaX
2023-10-10 15:19:35 +08:00
parent eb83923849
commit 4323383bb8
9 changed files with 251 additions and 63 deletions

View File

@@ -29,7 +29,7 @@ func (n *rpcRequestNode) Handle(msg *message.Message) error {
var rpc = &mqttclient.RpcRequest{Client: mqttclient.MqttClient, Mode: "double", Timeout: n.Timeout}
rpc.GetRequestId()
respPayload, err := rpc.RequestCmd(n.Payload)
err := rpc.RespondTpc(n.Payload)
if err != nil {
if failureLableNode != nil {
return failureLableNode.Handle(msg)
@@ -37,9 +37,6 @@ func (n *rpcRequestNode) Handle(msg *message.Message) error {
return err
}
}
msgM := msg.Msg
msgM["payload"] = respPayload
msg.Msg = msgM
if successLableNode != nil {
return successLableNode.Handle(msg)
}