|
|
@ -73,7 +73,9 @@ public class WebSocketCommandBusImpl implements CommandBus { |
|
|
|
} |
|
|
|
commandPacket.setPacketIndex(packetIndex); |
|
|
|
this.countDownLatch = new CountDownLatch(1); |
|
|
|
this.session.getBasicRemote().sendText(commandPacket.toByteString()); |
|
|
|
String byteString = commandPacket.toByteString(); |
|
|
|
log.info("ModuleId={}, CommandId={}, 数据包二进制字符内容={}", commandPacket.getModuleId(), commandPacket.getCmdId(), byteString); |
|
|
|
this.session.getBasicRemote().sendText(byteString); |
|
|
|
boolean isTimeout = !this.countDownLatch.await(timeout, unit); |
|
|
|
// 命令返回或者超时了 |
|
|
|
if (isTimeout) { |
|
|
|