code: public void awaitSettings(long timeout, TimeUnit unit) throws Exception {
          if (!promise.awaitUninterruptibly(timeout, unit)) {
              throw new IllegalStateException("Timed out waiting for settings");
          }
          if (!promise.isSuccess()) {
              throw new RuntimeException(promise.cause());
          }
      }
docs: Wait for this handler to be added after the upgrade to HTTP/2, and for initial preface
  handshake to complete.
  
  @param timeout Time to wait
  @param unit {@link java.util.concurrent.TimeUnit} for {@code timeout}
  @throws Exception if timeout or other failure occurs