Skip to content

Commit

Permalink
make http client register RetainableByteBufferPool
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
  • Loading branch information
lorban committed Jun 10, 2021
1 parent cec0fca commit e7e3ad0
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -58,6 +58,7 @@
import org.eclipse.jetty.io.ClientConnectionFactory;
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.io.MappedByteBufferPool;
import org.eclipse.jetty.io.RetainableByteBufferPool;
import org.eclipse.jetty.io.ssl.SslClientConnectionFactory;
import org.eclipse.jetty.util.Fields;
import org.eclipse.jetty.util.Jetty;
Expand Down Expand Up @@ -202,6 +203,8 @@ protected void doStart() throws Exception
Scheduler scheduler = getScheduler();
if (scheduler == null)
setScheduler(new ScheduledExecutorScheduler(name + "-scheduler", false));
if (getBean(RetainableByteBufferPool.class) == null)
addBean(new RetainableByteBufferPool(0, 2048, 65536, ProcessorUtils.availableProcessors() * 2));

if (resolver == null)
setSocketAddressResolver(new SocketAddressResolver.Async(getExecutor(), getScheduler(), getAddressResolutionTimeout()));
Expand Down

0 comments on commit e7e3ad0

Please sign in to comment.