|
|
@ -33,6 +33,7 @@ public class DeviceCommandService { |
|
|
|
commandFutureMap.put(cmdToDevice.getCommandId(), cmdFuture); |
|
|
|
if (!deviceTcpClient.sendToJSON(cmdToDevice)) { |
|
|
|
commandFutureMap.remove(cmdToDevice.getCommandId()); |
|
|
|
throw new RuntimeException("向设备发送指令失败"); |
|
|
|
} |
|
|
|
|
|
|
|
cmdFuture.getResponseFuture().whenComplete((result, ex) -> |
|
|
|