update 打印日志

This commit is contained in:
2023-11-20 13:51:17 +08:00
parent a4d323d191
commit 716c1109b2

View File

@@ -172,13 +172,13 @@ public class NettyServerHandler extends ChannelInboundHandlerAdapter {
boolean flag = false; boolean flag = false;
if (event.state() == IdleState.READER_IDLE) { // 读 if (event.state() == IdleState.READER_IDLE) { // 读
flag = true; flag = true;
log.error("Client-IP:【{}】, channelId:【{}】, pileSn:【{}】, READER_IDLE 读超时", socketString, channelId, pileSn); // log.error("Client-IP:【{}】, channelId:【{}】, pileSn:【{}】, READER_IDLE 读超时", socketString, channelId, pileSn);
} else if (event.state() == IdleState.WRITER_IDLE) { // 写 } else if (event.state() == IdleState.WRITER_IDLE) { // 写
flag = true; flag = true;
log.error("Client-IP:【{}】, channelId:【{}】, pileSn:【{}】, WRITER_IDLE 写超时", socketString, channelId, pileSn); // log.error("Client-IP:【{}】, channelId:【{}】, pileSn:【{}】, WRITER_IDLE 写超时", socketString, channelId, pileSn);
} else if (event.state() == IdleState.ALL_IDLE) { // 全部 } else if (event.state() == IdleState.ALL_IDLE) { // 全部
flag = true; flag = true;
log.error("Client-IP:【{}】, channelId:【{}】, pileSn:【{}】, ALL_IDLE 总超时", socketString, channelId, pileSn); // log.error("Client-IP:【{}】, channelId:【{}】, pileSn:【{}】, ALL_IDLE 总超时", socketString, channelId, pileSn);
} }
if (flag) { if (flag) {
ctx.channel().close(); ctx.channel().close();