@Override
    public void close(final CloseMode closeMode) {
        if (this.closeables != null) {
            Closeable closeable;
            while ((closeable = this.closeables.poll()) != null) {
                try {
                    if (closeable instanceof ModalCloseable) {
                        ((ModalCloseable) closeable).close(closeMode);
                    } else {
                        closeable.close();
                    }
                } catch (final IOException ex) {
                    LOG.error(ex.getMessage(), ex);
                }
            }
        }
    }
Internal implementation of {@link CloseableHttpClient}.
<p>
Concurrent message exchanges executed by this client will get assigned to
separate connections leased from the connection pool.
</p>

@since 4.3
httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/InternalHttpClient.java