ChannelOption.SO_BACKLOG 改为10240

This commit is contained in:
Guoqs
2024-11-28 09:27:21 +08:00
parent 972bf4ca06
commit eca0a75eb9

View File

@@ -50,7 +50,7 @@ public class NettyServerManager implements CommandLineRunner {
.channel(NioServerSocketChannel.class) .channel(NioServerSocketChannel.class)
.handler(new LoggingHandler(LogLevel.DEBUG)) .handler(new LoggingHandler(LogLevel.DEBUG))
// .option(ChannelOption.SO_BACKLOG, 128) // 默认128 // .option(ChannelOption.SO_BACKLOG, 128) // 默认128
.option(ChannelOption.SO_BACKLOG, 1024) .option(ChannelOption.SO_BACKLOG, 10240)
.option(ChannelOption.SO_REUSEADDR, true) .option(ChannelOption.SO_REUSEADDR, true)
.childOption(ChannelOption.SO_KEEPALIVE, true) .childOption(ChannelOption.SO_KEEPALIVE, true)
.childOption(ChannelOption.SO_REUSEADDR, true) .childOption(ChannelOption.SO_REUSEADDR, true)