File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
providers/netty4/src/main/java/org/asynchttpclient/netty/channel Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 18
18
import static org .asynchttpclient .util .HttpUtils .isWebSocket ;
19
19
import static org .asynchttpclient .util .MiscUtils .buildStaticIOException ;
20
20
import io .netty .bootstrap .Bootstrap ;
21
+ import io .netty .buffer .PooledByteBufAllocator ;
21
22
import io .netty .channel .Channel ;
22
23
import io .netty .channel .ChannelInitializer ;
23
24
import io .netty .channel .ChannelOption ;
@@ -175,6 +176,12 @@ public Semaphore apply(Object partitionKey) {
175
176
webSocketBootstrap = new Bootstrap ().channel (NioSocketChannel .class ).group (eventLoopGroup );
176
177
secureWebSocketBootstrap = new Bootstrap ().channel (NioSocketChannel .class ).group (eventLoopGroup );
177
178
179
+ // default to PooledByteBufAllocator
180
+ plainBootstrap .option (ChannelOption .ALLOCATOR , PooledByteBufAllocator .DEFAULT );
181
+ secureBootstrap .option (ChannelOption .ALLOCATOR , PooledByteBufAllocator .DEFAULT );
182
+ webSocketBootstrap .option (ChannelOption .ALLOCATOR , PooledByteBufAllocator .DEFAULT );
183
+ secureWebSocketBootstrap .option (ChannelOption .ALLOCATOR , PooledByteBufAllocator .DEFAULT );
184
+
178
185
if (config .getConnectTimeout () > 0 )
179
186
nettyConfig .addChannelOption (ChannelOption .CONNECT_TIMEOUT_MILLIS , config .getConnectTimeout ());
180
187
for (Entry <ChannelOption <Object >, Object > entry : nettyConfig .propertiesSet ()) {
You can’t perform that action at this time.
0 commit comments