Fixed issue: NETTY-374 ChunkedWriteHandler and handling messages after
channel close Fixed a bug where a write requests made after closure are not discarded
This commit is contained in:
parent
8ad04dc6ca
commit
6bfd2d6cec
@ -119,9 +119,13 @@ public class ChunkedWriteHandler implements ChannelUpstreamHandler, ChannelDowns
|
|||||||
boolean offered = queue.offer((MessageEvent) e);
|
boolean offered = queue.offer((MessageEvent) e);
|
||||||
assert offered;
|
assert offered;
|
||||||
|
|
||||||
if (ctx.getChannel().isWritable()) {
|
final Channel channel = ctx.getChannel();
|
||||||
|
if (channel.isWritable()) {
|
||||||
this.ctx = ctx;
|
this.ctx = ctx;
|
||||||
flush(ctx);
|
flush(ctx);
|
||||||
|
} else if (!channel.isConnected()) {
|
||||||
|
this.ctx = ctx;
|
||||||
|
discard(ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user