From d233be704191e6dd72a93548efc4b42bb29c29c9 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Mon, 9 Jul 2012 17:27:20 +0200 Subject: [PATCH] AIO: Act on the right ByteBuf when a exception was caught during write --- .../main/java/io/netty/channel/socket/aio/AioSocketChannel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport/src/main/java/io/netty/channel/socket/aio/AioSocketChannel.java b/transport/src/main/java/io/netty/channel/socket/aio/AioSocketChannel.java index 431b9b8d9a..83c9807e38 100644 --- a/transport/src/main/java/io/netty/channel/socket/aio/AioSocketChannel.java +++ b/transport/src/main/java/io/netty/channel/socket/aio/AioSocketChannel.java @@ -224,7 +224,7 @@ public class AioSocketChannel extends AbstractAioChannel implements SocketChanne channel.notifyFlushFutures(cause); channel.pipeline().fireExceptionCaught(cause); - ByteBuf buf = channel.pipeline().outboundByteBuffer(); + ByteBuf buf = channel.unsafe().directOutboundContext().outboundByteBuffer(); if (!buf.readable()) { buf.discardReadBytes(); }