private void connect(SessionProtocol desiredProtocol, SerializationFormat serializationFormat,
                         PoolKey key, ChannelAcquisitionFuture promise,
                         ClientConnectionTimingsBuilder timingsBuilder) {
        setPendingAcquisition(desiredProtocol, key, promise);
        timingsBuilder.socketConnectStart();

        // Fail immediately if it is certain that the remote address doesn't support the desired protocol.
        final SocketAddress remoteAddress = key.toRemoteAddress();
        if (SessionProtocolNegotiationCache.isUnsupported(remoteAddress, desiredProtocol)) {
            notifyConnect(desiredProtocol, key,
                          eventLoop.newFailedFuture(
                                  new SessionProtocolNegotiationException(
                                          desiredProtocol,
                                          "previously failed negotiation (remoteAddress: " +
                                          remoteAddress + ')')),
                          promise, timingsBuilder);
            return;
        }

        // Create a new connection.
        final Promise<Channel> sessionPromise = eventLoop.newPromise();
        connect(remoteAddress, desiredProtocol, serializationFormat, key, sessionPromise, timingsBuilder);

        if (sessionPromise.isDone()) {
            notifyConnect(desiredProtocol, key, sessionPromise, promise, timingsBuilder);
        } else {
            sessionPromise.addListener((Future<Channel> future) -> {
                notifyConnect(desiredProtocol, key, future, promise, timingsBuilder);
            });
        }
    }
Tries to use the pending HTTP/2 connection to avoid creating an extra connection.

@return {@code true} if succeeded to reuse the pending connection.
core/src/main/java/com/linecorp/armeria/client/HttpChannelPool.java