mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
@@ -37,7 +37,7 @@ func (rpc RpcRequest) Pub(deviceId, reqPayload string) error {
|
||||
topic := fmt.Sprintf(RpcRespTopic, rpc.RequestId)
|
||||
value, ok := Session.Load(deviceId)
|
||||
if !ok {
|
||||
return errors.New("为获取到设备的MQTT连接")
|
||||
return errors.New("未获取到设备的MQTT连接")
|
||||
}
|
||||
return Publish(topic, value.(string), reqPayload)
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ func Send(deviceId, msg string) error {
|
||||
}
|
||||
} else {
|
||||
global.Log.Infof("设备%s TCP连接不存在, 发送指令失败", deviceId)
|
||||
return errors.New("为获取到设备的MQTT连接")
|
||||
return errors.New("未获取到设备的MQTT连接")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user