shutdown check in ConnectionWatchdog.channelInactive added. #307

pull/337/head
Nikita 9 years ago
parent ca2ea59a96
commit 3c132084ff

@ -58,6 +58,10 @@ public class ConnectionWatchdog extends ChannelInboundHandlerAdapter {
@Override @Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception { public void channelInactive(ChannelHandlerContext ctx) throws Exception {
if (ctx.channel().eventLoop().parent().isShuttingDown()) {
return;
}
RedisConnection connection = RedisConnection.getFrom(ctx.channel()); RedisConnection connection = RedisConnection.getFrom(ctx.channel());
if (!connection.isClosed()) { if (!connection.isClosed()) {
EventLoopGroup group = ctx.channel().eventLoop().parent(); EventLoopGroup group = ctx.channel().eventLoop().parent();
@ -112,8 +116,6 @@ public class ConnectionWatchdog extends ChannelInboundHandlerAdapter {
} }
}, timeout, TimeUnit.MILLISECONDS); }, timeout, TimeUnit.MILLISECONDS);
} }
}); });
} }

Loading…
Cancel
Save