IdleStateHandler idleStateHandler = new IdleStateHandler(NettyUtils.hashedWheelTimer,
readTimeout, writeTimeout, 0);
ctx.getPipeline().addBefore(SessionHandler.class.getName(), IdleStateHandler.class.getName(),
idleStateHandler);
IdleStateAwareChannelHandler idleStateAwareChannelHandler = new IdleStateAwareChannelHandler() {
public void channelIdle(ChannelHandlerContext ctx, IdleStateEvent e) throws Exception {
logger.warn(
"channel:{} idle timeout exceeds, close channel to save server resources...",
ctx.getChannel());