Minor change in ReactorNetty2TcpClient

A follow-up on recent addition of ReactorNetty2TcpClient and switch to
Netty 5 Buffer.
This commit is contained in:
rstoyanchev
2022-09-12 14:23:05 +01:00
parent 58a2b79699
commit bbe5e91ebc

View File

@@ -340,7 +340,7 @@ public class ReactorNetty2TcpClient<P> implements TcpOperations<P> {
protected void decode(ChannelHandlerContext ctx, Buffer buffer) throws Exception {
ByteBuffer byteBuffer = ByteBuffer.allocate(buffer.readableBytes());
buffer.readBytes(byteBuffer);
byteBuffer.position(0);
byteBuffer.flip();
List<Message<P>> messages = this.codec.decode(byteBuffer);
for (Message<P> message : messages) {
ctx.fireChannelRead(message);