@Override
    public boolean release(PooledConnection conn) {

        conn.stopRequestTimer();
        metrics.releaseConnCounter().increment();
        metrics.connsInUse().decrementAndGet();

        DiscoveryResult discoveryResult = conn.getServer();
        updateServerStatsOnRelease(conn);

        boolean released = false;

        if (conn.isShouldClose()) {
            // Close and discard the connection, as it has been flagged (possibly due to receiving a non-channel error
            // like a 503).
            conn.setInPool(false);
            conn.close();
            LOG.debug(
                    "[{}] closing conn flagged to be closed", conn.getChannel().id());
        } else if (isConnectionExpired(conn.getUsageCount())) {
            conn.setInPool(false);
            conn.close();
            metrics.closeExpiredConnLifetimeCounter().increment();
            LOG.debug(
                    "[{}] closing conn lifetime expired, usage: {}",
                    conn.getChannel().id(),
                    conn.getUsageCount());
        } else if (connPoolConfig.isCloseOnCircuitBreakerEnabled() && discoveryResult.isCircuitBreakerTripped()) {
            LOG.debug(
                    "[{}] closing conn, server circuit breaker tripped",
                    conn.getChannel().id());
            metrics.circuitBreakerClose().increment();
            // Don't put conns for currently circuit-tripped servers back into the pool.
            conn.setInPool(false);
            conn.close();
        } else if (!conn.isActive()) {
            LOG.debug("[{}] conn inactive, cleaning up", conn.getChannel().id());
            // Connection is already closed, so discard.
            metrics.alreadyClosedCounter().increment();
            // make sure to decrement OpenConnectionCounts
            conn.updateServerStats();
            conn.setInPool(false);
        } else {
            releaseHandlers(conn);

            // Attempt to return connection to the pool.
            IConnectionPool pool = perServerPools.get(discoveryResult);
            if (pool != null) {
                released = pool.release(conn);
            } else {
                // The pool for this server no longer exists (maybe due to it falling out of
                // discovery).
                conn.setInPool(false);
                released = false;
                conn.close();
            }

            LOG.debug("PooledConnection released: {}", conn);
        }

        return released;
    }
Gracefully shuts down a DefaultClientChannelManager by allowing in-flight requests to finish before closing the connections.
Idle connections in the connection pools are closed, and any connections associated with an in-flight request
will be closed upon trying to return the connection to the pool
zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java