@Override
    public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
        super.userEventTriggered(ctx, evt);

        if (evt instanceof IdleStateEvent) {
            counter.increment();
            ctx.close();
        }
    }
Just listens for the IdleStateEvent and closes the channel if received.
zuul-core/src/main/java/com/netflix/netty/common/CloseOnIdleStateHandler.java