Avoid double-wrapping allocator (#49534)

When using unpooled, the allocator is wrapped twice in a NoDirectBuffers.
This commit is contained in:
Yannick Welsch 2019-11-27 09:24:16 +01:00
parent 09c4269097
commit bd007271cf
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ public class NettyAllocator {
} else {
ByteBufAllocator delegate;
if (useUnpooled()) {
delegate = new NoDirectBuffers(UnpooledByteBufAllocator.DEFAULT);
delegate = UnpooledByteBufAllocator.DEFAULT;
} else {
int nHeapArena = PooledByteBufAllocator.defaultNumHeapArena();
int pageSize = PooledByteBufAllocator.defaultPageSize();