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