|
|
|
@ -113,8 +113,12 @@ public class Jtt1078Handler extends SimpleChannelInboundHandler<Packet> { |
|
|
|
IdleStateEvent event = (IdleStateEvent) evt; |
|
|
|
IdleStateEvent event = (IdleStateEvent) evt; |
|
|
|
if (event.state() == IdleState.READER_IDLE) { |
|
|
|
if (event.state() == IdleState.READER_IDLE) { |
|
|
|
String tag = SessionManager.get(ctx.channel(), "tag"); |
|
|
|
String tag = SessionManager.get(ctx.channel(), "tag"); |
|
|
|
logger.info(BusinessConstant.LOGGER_PREFIX + " : 连接超时 userEventTriggered : channelId = {} : tag = {}", ctx.channel() == null ? "null" : ctx.channel().id().asLongText(), tag); |
|
|
|
|
|
|
|
release(ctx.channel()); |
|
|
|
// 只有当该超时的连接已存在时, 打印超时日志, 防止重复打印
|
|
|
|
|
|
|
|
if (tag != null) { |
|
|
|
|
|
|
|
logger.info(BusinessConstant.LOGGER_PREFIX + " : 连接超时 userEventTriggered : channelId = {} : tag = {}", ctx.channel() == null ? "null" : ctx.channel().id().asLongText(), tag); |
|
|
|
|
|
|
|
release(ctx.channel()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|