From c994fa6eff7769ab8e9877c3d9bdcf42bca4ef6d Mon Sep 17 00:00:00 2001 From: "autumn.g@foxmail.com" Date: Tue, 12 Sep 2023 09:22:07 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=89=93=E5=8D=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsowell/netty/server/yunkuaichong/NettyServerHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jsowell-netty/src/main/java/com/jsowell/netty/server/yunkuaichong/NettyServerHandler.java b/jsowell-netty/src/main/java/com/jsowell/netty/server/yunkuaichong/NettyServerHandler.java index c02e23769..1f630e603 100644 --- a/jsowell-netty/src/main/java/com/jsowell/netty/server/yunkuaichong/NettyServerHandler.java +++ b/jsowell-netty/src/main/java/com/jsowell/netty/server/yunkuaichong/NettyServerHandler.java @@ -189,7 +189,9 @@ public class NettyServerHandler extends ChannelInboundHandlerAdapter { @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { ChannelId channelId = ctx.channel().id(); - log.error("发生异常 channelId:{}", channelId.asShortText(), cause); + String channelIdShortText = channelId.asShortText(); + String pileSn = PileChannelEntity.getPileSnByChannelId(channelIdShortText); + log.error("发生异常 channelId:{}, pileSn:{}", channelIdShortText, pileSn, cause); cause.printStackTrace(); // 如果桩连到平台,在1分钟内没有发送数据过来,会报ReadTimeoutException异常 if (cause instanceof ReadTimeoutException) {