Fixed a buffer rewrite trap which occurs when DirectChannelBufferFactory is used
This commit is contained in:
parent
2eb2901c1c
commit
d4438170c9
@ -335,8 +335,9 @@ class NioWorker implements Runnable {
|
||||
|
||||
final ChannelBufferFactory bufferFactory =
|
||||
channel.getConfig().getBufferFactory();
|
||||
final ChannelBuffer buffer = bufferFactory.getBuffer(
|
||||
bb.order(bufferFactory.getDefaultOrder()));
|
||||
final ChannelBuffer buffer = bufferFactory.getBuffer(readBytes);
|
||||
buffer.setBytes(0, bb);
|
||||
buffer.writerIndex(readBytes);
|
||||
|
||||
recvBufferPool.release(bb);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user