Skip to content

Commit

Permalink
Replace wrong Vertx direct allocator with Netty one
Browse files Browse the repository at this point in the history
  • Loading branch information
franz1981 committed Apr 2, 2024
1 parent 9ca43be commit 168720e
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import io.netty.buffer.CompositeByteBuf;
import io.netty.buffer.PooledByteBufAllocator;
import io.netty.util.internal.PlatformDependent;
import io.vertx.core.buffer.impl.PartialPooledByteBufAllocator;
import io.vertx.core.buffer.impl.VertxByteBufAllocator;

/**
Expand Down Expand Up @@ -134,8 +133,7 @@ public int append(byte[] bytes, int off, int len) {
// VertxByteBufAllocator allocates cheaper heap buffers ie which doesn't use reference counting
tmpBuf = VertxByteBufAllocator.DEFAULT.heapBuffer(chunkCapacity);
} else {
// Vertx should replace the "standerd" PooledByteBufAllocator.DEFAULT this one
tmpBuf = PartialPooledByteBufAllocator.INSTANCE.directBuffer(chunkCapacity);
tmpBuf = PooledByteBufAllocator.DEFAULT.directBuffer(chunkCapacity);
}
try {
tmpBuf.writeBytes(bytes, off, toWrite);
Expand Down

0 comments on commit 168720e

Please sign in to comment.