Skip to content

Commit

Permalink
Use the correct ChannelBufferFactory when creating new ChannelBuffers…
Browse files Browse the repository at this point in the history
…. See netty#335

Conflicts:

	handler/src/main/java/io/netty/handler/ssl/SslHandler.java
  • Loading branch information
normanmaurer authored and trustin committed May 31, 2012
1 parent ed35718 commit 1226cda
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions handler/src/main/java/io/netty/handler/ssl/SslHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -702,11 +702,6 @@ private ChannelFuture wrap(ChannelHandlerContext context, Channel channel)
outNetBuf.flip();
int remaining = outNetBuf.remaining();
msg = ChannelBuffers.buffer(remaining);

// Transfer the bytes to the new ChannelBuffer using some safe method that will also
// work with "non" heap buffers
//
// See https://github.com/netty/netty/issues/329
msg.writeBytes(outNetBuf);
outNetBuf.clear();

Expand Down Expand Up @@ -845,8 +840,14 @@ private ChannelFuture wrapNonAppData(ChannelHandlerContext ctx, Channel channel)

if (result.bytesProduced() > 0) {
outNetBuf.flip();
<<<<<<< HEAD
ChannelBuffer msg = ChannelBuffers.buffer(outNetBuf.remaining());

=======
ChannelBuffer msg = ctx.getChannel().getConfig().getBufferFactory().getBuffer(outNetBuf.remaining());


>>>>>>> d2ec45e... Use the correct ChannelBufferFactory when creating new ChannelBuffers. See #335
// 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 1226cda

Please sign in to comment.