code: public boolean await(long timeoutMillis) throws IOException {
      try {
        return connectLatch.await(timeoutMillis, TimeUnit.MILLISECONDS);
      } catch (InterruptedException e) {
        interruptedException(
            "Interrupted waiting for connection (timeout = " + timeoutMillis +
                "ms.)", e);
        return false;
      }
    }
docs: Wait until either a specified timeout expires or a connection is
  created to ZooKeeper.
  @see {@link CountDownLatch#await(long, TimeUnit)}
  @param timeoutMillis  Wait this long (in milliseconds) for a connection
  to be established to ZooKeeper.
  @return True if a connection was established within the specified timeout,
  false if a timeout has occurred before a connection to ZooKeeper
  could be established.
  @throws IOException If we interrupted while awaiting for connection to
  ZooKeeper to be established