code: public void stop(int waitMillis) throws InterruptedException {
      try {
        if (!isDone()) {
          setExitStatus(new Event(EventType.STOPPED_BY_USER, String.format("Stopped by user: waiting for %d ms", waitMillis)));
        }
        if (!waitForFinish(waitMillis)) {
          logger.warn("{} Client thread failed to finish in {} millis", name, waitMillis);
        }
      } finally {
        rateTracker.shutdown();
      }
    }
docs: Stops the current connection. No reconnecting will occur. Kills thread + cleanup.
  Waits for the loop to end