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 ;
@@ -180,6 +181,12 @@ public Semaphore apply(Object partitionKey) {
180
181
webSocketBootstrap = new Bootstrap ().channel (socketChannelClass ).group (eventLoopGroup );
181
182
secureWebSocketBootstrap = new Bootstrap ().channel (socketChannelClass ).group (eventLoopGroup );
182
183
184
+ // default to PooledByteBufAllocator
185
+ plainBootstrap .option (ChannelOption .ALLOCATOR , PooledByteBufAllocator .DEFAULT );
186
+ secureBootstrap .option (ChannelOption .ALLOCATOR , PooledByteBufAllocator .DEFAULT );
187
+ webSocketBootstrap .option (ChannelOption .ALLOCATOR , PooledByteBufAllocator .DEFAULT );
188
+ secureWebSocketBootstrap .option (ChannelOption .ALLOCATOR , PooledByteBufAllocator .DEFAULT );
189
+
183
190
if (config .getConnectTimeout () > 0 )
184
191
nettyConfig .addChannelOption (ChannelOption .CONNECT_TIMEOUT_MILLIS , config .getConnectTimeout ());
185
192
for (Entry <ChannelOption <Object >, Object > entry : nettyConfig .propertiesSet ()) {
You can’t perform that action at this time.
0 commit comments