Fix IllegalBufferAccessException in the UDT message examples

- Fixes #1104
This commit is contained in:
Trustin Lee 2013-03-18 13:48:15 +09:00
parent d3327e7f46
commit 660e6f4afe
3 changed files with 3 additions and 3 deletions

View File

@ -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();
}

View File

@ -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();
}
}

View File

@ -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();
}