[#1570] ChunkedWriteHandler.discard(..) must not call fireExceptionCaught(...)
This commit is contained in:
parent
1a7d1f7023
commit
023201f684
@ -152,7 +152,7 @@ public class ChunkedWriteHandler
|
|||||||
super.channelInactive(ctx);
|
super.channelInactive(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void discard(final ChannelHandlerContext ctx, Throwable cause) {
|
private void discard(Throwable cause) {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
PendingWrite currentWrite = this.currentWrite;
|
PendingWrite currentWrite = this.currentWrite;
|
||||||
|
|
||||||
@ -190,16 +190,12 @@ public class ChunkedWriteHandler
|
|||||||
currentWrite.fail(cause);
|
currentWrite.fail(cause);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cause != null) {
|
|
||||||
ctx.fireExceptionCaught(cause);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doFlush(final ChannelHandlerContext ctx) throws Exception {
|
private void doFlush(final ChannelHandlerContext ctx) throws Exception {
|
||||||
Channel channel = ctx.channel();
|
Channel channel = ctx.channel();
|
||||||
if (!channel.isActive()) {
|
if (!channel.isActive()) {
|
||||||
discard(ctx, null);
|
discard(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
boolean needsFlush;
|
boolean needsFlush;
|
||||||
@ -312,7 +308,7 @@ public class ChunkedWriteHandler
|
|||||||
ctx.flush();
|
ctx.flush();
|
||||||
}
|
}
|
||||||
if (!channel.isActive()) {
|
if (!channel.isActive()) {
|
||||||
discard(ctx, new ClosedChannelException());
|
discard(new ClosedChannelException());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user