Showing
1 changed file
with
2 additions
and
2 deletions
... | ... | @@ -204,7 +204,7 @@ public class TcpTransportHandler extends ChannelInboundHandlerAdapter implements |
204 | 204 | return; |
205 | 205 | } |
206 | 206 | log.error("【{}】设备【{}】收到数据【{}】", sessionId,deviceSessionCtx.getDeviceId(), tcpMessage.getMessage()); |
207 | - if (gatewaySessionHandler != null) { | |
207 | + if (!deviceSessionCtx.getDeviceCode().equals(tcpMessage.getMessage()) && gatewaySessionHandler != null) { | |
208 | 208 | processGatewayDeviceMsg(ctx, tcpMessage); |
209 | 209 | transportService.reportActivity(deviceSessionCtx.getSessionInfo()); |
210 | 210 | } else { |
... | ... | @@ -663,7 +663,7 @@ public class TcpTransportHandler extends ChannelInboundHandlerAdapter implements |
663 | 663 | |
664 | 664 | @Override |
665 | 665 | public void onToDeviceRpcRequest(UUID sessionId, TransportProtos.ToDeviceRpcRequestMsg rpcRequest) { |
666 | - log.error("【{}】下发RPC命令【{}】给设备", sessionId,rpcRequest.getParams()); | |
666 | + log.error("【{}】下发RPC命令【{}】给设备【{}】", sessionId,rpcRequest.getParams(),deviceSessionCtx.getDeviceInfo().getDeviceName()); | |
667 | 667 | TcpTransportAdaptor adaptor = deviceSessionCtx.getPayloadAdaptor(); |
668 | 668 | try { |
669 | 669 | adaptor.convertToPublish(deviceSessionCtx, rpcRequest).ifPresent(payload -> { | ... | ... |