Skip to content

Commit ad12ddd

Browse files
committed
forces TcpDuplexConnection to use connection allocator
Signed-off-by: Oleh Dokuka <[email protected]>
1 parent a81b639 commit ad12ddd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

rsocket-transport-netty/src/main/java/io/rsocket/transport/netty/TcpDuplexConnection.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
public final class TcpDuplexConnection extends BaseDuplexConnection {
3232

3333
private final Connection connection;
34-
private final ByteBufAllocator allocator = ByteBufAllocator.DEFAULT;
3534
private final boolean encodeLength;
3635

3736
/**
@@ -89,7 +88,7 @@ public Mono<Void> send(Publisher<ByteBuf> frames) {
8988

9089
private ByteBuf encode(ByteBuf frame) {
9190
if (encodeLength) {
92-
return FrameLengthFlyweight.encode(allocator, frame.readableBytes(), frame);
91+
return FrameLengthFlyweight.encode(alloc(), frame.readableBytes(), frame);
9392
} else {
9493
return frame;
9594
}

0 commit comments

Comments
 (0)