This commit is contained in:
Redkale
2018-07-13 23:11:36 +08:00
parent 6d135efbc6
commit 511a966ce5

View File

@@ -39,7 +39,7 @@ public abstract class PoolTcpSource extends PoolSource<AsyncConnection> {
this.bufferPool = bufferPool;
this.executor = executor;
try {
this.group = AsynchronousChannelGroup.withCachedThreadPool(executor, executor.getCorePoolSize());
this.group = AsynchronousChannelGroup.withFixedThreadPool(executor.getCorePoolSize(), executor.getThreadFactory());
} catch (IOException e) {
throw new RuntimeException(e);
}
@@ -121,7 +121,7 @@ public abstract class PoolTcpSource extends PoolSource<AsyncConnection> {
t.printStackTrace();
return null;
}
}).thenCompose((conn2) -> {
}, executor).thenCompose((conn2) -> {
if (conn2 != null && conn2.isOpen()) {
cycleCounter.incrementAndGet();
usingCounter.incrementAndGet();