DirectChannelBufferFactory.getBuffer(ByteBuffer) must not return a read only buffer
This commit is contained in:
parent
127851df31
commit
abfae49a7c
@ -150,7 +150,7 @@ public class DirectChannelBufferFactory extends AbstractChannelBufferFactory {
|
||||
}
|
||||
|
||||
public ChannelBuffer getBuffer(ByteBuffer nioBuffer) {
|
||||
if (nioBuffer.isDirect()) {
|
||||
if (!nioBuffer.isReadOnly() && nioBuffer.isDirect()) {
|
||||
return ChannelBuffers.wrappedBuffer(nioBuffer);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user