Use the correct ChannlBufferFactory when creating new ChannelBuffers. See #335
This commit is contained in:
parent
ab5939e205
commit
231dc284d7
@ -727,7 +727,7 @@ public class SslHandler extends FrameDecoder
|
|||||||
if (result.bytesProduced() > 0) {
|
if (result.bytesProduced() > 0) {
|
||||||
outNetBuf.flip();
|
outNetBuf.flip();
|
||||||
int remaining = outNetBuf.remaining();
|
int remaining = outNetBuf.remaining();
|
||||||
msg = ChannelBuffers.buffer(remaining);
|
msg = ctx.getChannel().getConfig().getBufferFactory().getBuffer(remaining);
|
||||||
|
|
||||||
// Transfer the bytes to the new ChannelBuffer using some safe method that will also
|
// Transfer the bytes to the new ChannelBuffer using some safe method that will also
|
||||||
// work with "non" heap buffers
|
// work with "non" heap buffers
|
||||||
@ -871,7 +871,8 @@ public class SslHandler extends FrameDecoder
|
|||||||
|
|
||||||
if (result.bytesProduced() > 0) {
|
if (result.bytesProduced() > 0) {
|
||||||
outNetBuf.flip();
|
outNetBuf.flip();
|
||||||
ChannelBuffer msg = ChannelBuffers.buffer(outNetBuf.remaining());
|
ChannelBuffer msg = ctx.getChannel().getConfig().getBufferFactory().getBuffer(outNetBuf.remaining());
|
||||||
|
|
||||||
|
|
||||||
// Transfer the bytes to the new ChannelBuffer using some safe method that will also
|
// Transfer the bytes to the new ChannelBuffer using some safe method that will also
|
||||||
// work with "non" heap buffers
|
// work with "non" heap buffers
|
||||||
|
Loading…
Reference in New Issue
Block a user