diff --git a/spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/ReactorNetty2TcpClient.java b/spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/ReactorNetty2TcpClient.java index 70985b4d4b..e0192b68f7 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/ReactorNetty2TcpClient.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/ReactorNetty2TcpClient.java @@ -340,7 +340,7 @@ public class ReactorNetty2TcpClient
implements TcpOperations
{
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 : messages) {
ctx.fireChannelRead(message);