Skip to content

Commit

Permalink
forces TcpDuplexConnection to use connection allocator
Browse files Browse the repository at this point in the history
Signed-off-by: Oleh Dokuka <[email protected]>
  • Loading branch information
OlegDokuka committed Apr 27, 2020
1 parent a81b639 commit ad12ddd
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 31,6 @@
public final class TcpDuplexConnection extends BaseDuplexConnection {

private final Connection connection;
private final ByteBufAllocator allocator = ByteBufAllocator.DEFAULT;
private final boolean encodeLength;

/**
Expand Down Expand Up @@ -89,7 88,7 @@ public Mono<Void> send(Publisher<ByteBuf> frames) {

private ByteBuf encode(ByteBuf frame) {
if (encodeLength) {
return FrameLengthFlyweight.encode(allocator, frame.readableBytes(), frame);
return FrameLengthFlyweight.encode(alloc(), frame.readableBytes(), frame);
} else {
return frame;
}
Expand Down

0 comments on commit ad12ddd

Please sign in to comment.