1、加长TCP空闲周期

This commit is contained in:
weidong 2024-04-08 19:15:12 +08:00
parent d733f361af
commit 7cc12e830d

View File

@ -40,7 +40,7 @@ public class RtcmTcpServer implements ApplicationRunner {
@Override @Override
protected void initChannel(Channel channel) throws Exception { protected void initChannel(Channel channel) throws Exception {
ChannelPipeline p = channel.pipeline(); ChannelPipeline p = channel.pipeline();
p.addLast(new IdleStateHandler(300, 300, 300)); //设置心跳超时时间 p.addLast(new IdleStateHandler(600, 600, 600)); //设置心跳超时时间
p.addLast(new RtcmTcpHandler()); p.addLast(new RtcmTcpHandler());
} }
}); });