Skip to content

Commit bbe5e91

Browse files
committed
Minor change in ReactorNetty2TcpClient
A follow-up on recent addition of ReactorNetty2TcpClient and switch to Netty 5 Buffer.
1 parent 58a2b79 commit bbe5e91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/ReactorNetty2TcpClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ private static class StompMessageDecoder<P> extends ByteToMessageDecoder {
340340
protected void decode(ChannelHandlerContext ctx, Buffer buffer) throws Exception {
341341
ByteBuffer byteBuffer = ByteBuffer.allocate(buffer.readableBytes());
342342
buffer.readBytes(byteBuffer);
343-
byteBuffer.position(0);
343+
byteBuffer.flip();
344344
List<Message<P>> messages = this.codec.decode(byteBuffer);
345345
for (Message<P> message : messages) {
346346
ctx.fireChannelRead(message);

0 commit comments

Comments
 (0)