线程池调整.

This commit is contained in:
aoshiguchen
2023-03-15 12:01:49 +08:00
parent 69e5fb10d8
commit 7fd6fd5313
6 changed files with 11 additions and 5 deletions
@@ -38,5 +38,6 @@ public class ProxyConfig {
private Boolean sslEnable;
private Integer obtainLicenseInterval;
private String licenseKey;
private Integer threadCount;
}
}
@@ -66,7 +66,7 @@ public class ProxyClientService {
public void init() {
this.reconnectExecutor.scheduleWithFixedDelay(this::reconnect, 0, RECONNECT_INTERVAL_SECONDS, TimeUnit.SECONDS);
NioEventLoopGroup workerGroup = new NioEventLoopGroup();
NioEventLoopGroup workerGroup = new NioEventLoopGroup(proxyConfig.getClient().getThreadCount());
realServerBootstrap.group(workerGroup);
realServerBootstrap.channel(NioSocketChannel.class);
realServerBootstrap.handler(new ChannelInitializer<SocketChannel>() {
@@ -13,6 +13,7 @@ neutrino:
write-idle-time: 8
all-idle-time-seconds: 0
client:
thread-count: 50
key-store-password: 123456
jks-path: classpath:/test.jks
server-ip: localhost