@Override
    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
        // Close the connection when an exception is raised.
        Log.error("Exception caught on channel {}", ctx.channel().remoteAddress() == null ? ctx.channel().localAddress() : ctx.channel().localAddress() + "--" + ctx.channel().remoteAddress(), cause);
        ctx.channel().close();
    }
Returns the time that a connection can be idle before being closed.

@return the time a connection can be idle.
xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyConnectionHandler.java