Fixed a bug where channelClosed event is not propagated in ReadTimeoutHandler
This commit is contained in:
parent
63e586586b
commit
188c7f94aa
@ -90,21 +90,21 @@ public class ReadTimeoutHandler extends SimpleChannelUpstreamHandler implements
|
||||
public void channelOpen(ChannelHandlerContext ctx, ChannelStateEvent e)
|
||||
throws Exception {
|
||||
initialize(ctx);
|
||||
super.channelOpen(ctx, e);
|
||||
ctx.sendUpstream(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e)
|
||||
throws Exception {
|
||||
destroy();
|
||||
super.channelOpen(ctx, e);
|
||||
ctx.sendUpstream(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e)
|
||||
throws Exception {
|
||||
lastReadTime = System.nanoTime();
|
||||
super.messageReceived(ctx, e);
|
||||
ctx.sendUpstream(e);
|
||||
}
|
||||
|
||||
private void initialize(ChannelHandlerContext ctx) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user