客户端优化,解决长时间数据写入,导致指令通道被关闭的问题
This commit is contained in:
+4
-2
@@ -73,13 +73,15 @@ public class ClientChannelHandler extends SimpleChannelInboundHandler<ProxyMessa
|
||||
switch (event.state()) {
|
||||
case READER_IDLE:
|
||||
// 读超时,断开连接
|
||||
log.info("读超时");
|
||||
ctx.channel().close();
|
||||
// log.info("读超时");
|
||||
// ctx.channel().close();
|
||||
break;
|
||||
case WRITER_IDLE:
|
||||
ctx.channel().writeAndFlush(ProxyMessage.buildHeartbeatMessage());
|
||||
break;
|
||||
case ALL_IDLE:
|
||||
log.info("读写超时");
|
||||
ctx.channel().close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ neutrino:
|
||||
length-adjustment: 0
|
||||
read-idle-time: 40
|
||||
write-idle-time: 5
|
||||
all-idle-time-seconds: 0
|
||||
all-idle-time-seconds: 45
|
||||
client:
|
||||
thread-count: 50
|
||||
key-store-password: ${STORE_PASS:123456}
|
||||
|
||||
-1
@@ -124,7 +124,6 @@ public class ServerChannelHandler extends SimpleChannelInboundHandler<ProxyMessa
|
||||
ctx.channel().close();
|
||||
break;
|
||||
case WRITER_IDLE:
|
||||
log.info("写超时");
|
||||
break;
|
||||
case ALL_IDLE:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user