未验证 提交 d26148d4 编写于 作者: 麦壳饼's avatar 麦壳饼 提交者: GitHub

Merge pull request #1065 from liumanduo/master

修改网关子设备判断逻辑
......@@ -956,7 +956,7 @@ namespace IoTSharp.Controllers
await rpcClient.ConnectAsync();
byte[] response = null;
//如果是网关的子设备, 因为客户端无法知道Id,因此发至名称
if (dev.DeviceType == DeviceType.Device && string.IsNullOrEmpty(dev.Owner?.Name))
if (dev.DeviceType == DeviceType.Device && !string.IsNullOrEmpty(dev.Owner?.Name))
{
_logger.LogInformation($"RPC 设备{dev.Name} 的所有者名称不为空, 因此是子设备。 传入名称 作为topic ");
response = await rpcClient.ExecuteAsync(_timeout, dev.Name, method, payload, qos);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册