protected void handleConnectCompletion(
            ChannelFuture cf, Promise<PooledConnection> callerPromise, CurrentPassport passport) {
        connCreationsInProgress.decrementAndGet();
        updateServerStatsOnConnectCompletion(cf);
        if (cf.isSuccess()) {
            passport.add(PassportState.ORIGIN_CH_CONNECTED);
            createConnSucceededCounter.increment();
            connsInUse.incrementAndGet();
            createConnection(cf, callerPromise, passport);
        } else {
            createConnFailedCounter.increment();

            // unwrap DecoderExceptions to get a better indication of why decoding failed
            // as decoding failures are not indicative of actual connection causes
            if (cf.cause() instanceof DecoderException de && de.getCause() != null) {
                callerPromise.setFailure(new OriginConnectException(
                        de.getCause().getMessage(), de.getCause(), OutboundErrorType.CONNECT_ERROR));
            } else {
                callerPromise.setFailure(new OriginConnectException(
                        cf.cause().getMessage(), cf.cause(), OutboundErrorType.CONNECT_ERROR));
            }
        }
    }
function to run when a connection is acquired before returning it to caller.
zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java