[#1570] ChunkedWriteHandler.discard(..) must not call fireExceptionCaught(...)

This commit is contained in:
Norman Maurer 2013-07-12 10:58:38 +02:00
parent 1a7d1f7023
commit 023201f684

View File

@ -152,7 +152,7 @@ public class ChunkedWriteHandler
super.channelInactive(ctx);
}
private void discard(final ChannelHandlerContext ctx, Throwable cause) {
private void discard(Throwable cause) {
for (;;) {
PendingWrite currentWrite = this.currentWrite;
@ -190,16 +190,12 @@ public class ChunkedWriteHandler
currentWrite.fail(cause);
}
}
if (cause != null) {
ctx.fireExceptionCaught(cause);
}
}
private void doFlush(final ChannelHandlerContext ctx) throws Exception {
Channel channel = ctx.channel();
if (!channel.isActive()) {
discard(ctx, null);
discard(null);
return;
}
boolean needsFlush;
@ -312,7 +308,7 @@ public class ChunkedWriteHandler
ctx.flush();
}
if (!channel.isActive()) {
discard(ctx, new ClosedChannelException());
discard(new ClosedChannelException());
return;
}
}