public void shutDown() throws IOException {
    synchronized (transportsCreated) {
      while (!transportsCreated.isEmpty()) {
        transportsCreated.peekFirst().shutdown();
        transportsCreated.removeFirst();
      }
    }
    synchronized (responsesCreated) {
      while (!responsesCreated.isEmpty()) {
        responsesCreated.peekFirst().close();
        responsesCreated.removeFirst();
      }
    }
  }
Closes all connections and allocated resources, whether they are currently used or not.

<p>If an I/O error occurs, shutdown attempts stop immediately, resulting in partial resource
release up to that point. The method can be called again later to re-attempt releasing all
resources.

@throws IOException when I/O error shutting down resources
jib-core/src/main/java/com/google/cloud/tools/jib/http/FailoverHttpClient.java