线程池调整.
This commit is contained in:
+1
@@ -38,5 +38,6 @@ public class ProxyConfig {
|
||||
private Boolean sslEnable;
|
||||
private Integer obtainLicenseInterval;
|
||||
private String licenseKey;
|
||||
private Integer threadCount;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user