Fixed a bug where a dynamic buffer's readerIndex goes out of sync on expansion
This commit is contained in:
parent
fabe3a36c9
commit
9bbce4a223
@ -275,7 +275,7 @@ public class DynamicChannelBuffer extends AbstractChannelBuffer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ChannelBuffer newBuffer = factory().getBuffer(order(), newCapacity);
|
ChannelBuffer newBuffer = factory().getBuffer(order(), newCapacity);
|
||||||
newBuffer.writeBytes(buffer, readerIndex(), readableBytes());
|
newBuffer.writeBytes(buffer, 0, writerIndex());
|
||||||
buffer = newBuffer;
|
buffer = newBuffer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user