Skip to content

Commit

Permalink
Use the correct ChannlBufferFactory when creating new ChannelBuffers.…
Browse files Browse the repository at this point in the history
… See #335
  • Loading branch information
normanmaurer committed May 18, 2012
1 parent ab5939e commit 231dc28
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
Expand Up @@ -727,7 +727,7 @@ private ChannelFuture wrap(ChannelHandlerContext context, Channel channel)
if (result.bytesProduced() > 0) {
outNetBuf.flip();
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
// work with "non" heap buffers
Expand Down Expand Up @@ -871,7 +871,8 @@ private ChannelFuture wrapNonAppData(ChannelHandlerContext ctx, Channel channel)

if (result.bytesProduced() > 0) {
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
// work with "non" heap buffers
Expand Down

0 comments on commit 231dc28

Please sign in to comment.