1、加长TCP空闲周期
This commit is contained in:
parent
7cc12e830d
commit
1639575184
@ -36,7 +36,7 @@ public class RtcmTcpHandler extends SimpleChannelInboundHandler<ByteBuf> {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
|
||||
if(evt instanceof IdleStateEvent) {
|
||||
@ -49,7 +49,7 @@ public class RtcmTcpHandler extends SimpleChannelInboundHandler<ByteBuf> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
@Override
|
||||
public void channelInactive(ChannelHandlerContext ctx)
|
||||
throws Exception {
|
||||
|
||||
@ -40,7 +40,7 @@ public class RtcmTcpServer implements ApplicationRunner {
|
||||
@Override
|
||||
protected void initChannel(Channel channel) throws Exception {
|
||||
ChannelPipeline p = channel.pipeline();
|
||||
p.addLast(new IdleStateHandler(600, 600, 600)); //设置心跳超时时间,秒
|
||||
//p.addLast(new IdleStateHandler(600, 600, 600)); //设置心跳超时时间,秒
|
||||
p.addLast(new RtcmTcpHandler());
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user