Fix IllegalBufferAccessException in the UDT message examples
- Fixes #1104
This commit is contained in:
parent
d3327e7f46
commit
660e6f4afe
@ -73,7 +73,7 @@ public class MsgEchoClientHandler extends
|
||||
final ByteBuf byteBuf = message.data();
|
||||
meter.mark(byteBuf.readableBytes());
|
||||
final MessageBuf<Object> out = ctx.nextOutboundMessageBuffer();
|
||||
out.add(message);
|
||||
out.add(message.retain());
|
||||
ctx.flush();
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class MsgEchoServerHandler extends
|
||||
public void messageReceived(final ChannelHandlerContext ctx,
|
||||
final UdtMessage message) throws Exception {
|
||||
final MessageBuf<Object> out = ctx.nextOutboundMessageBuffer();
|
||||
out.add(message);
|
||||
out.add(message.retain());
|
||||
ctx.flush();
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ public class MsgEchoPeerHandler extends
|
||||
final ByteBuf byteBuf = message.data();
|
||||
meter.mark(byteBuf.readableBytes());
|
||||
final MessageBuf<Object> out = ctx.nextOutboundMessageBuffer();
|
||||
out.add(message);
|
||||
out.add(message.retain());
|
||||
ctx.flush();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user