code: public void reconnectNow(boolean forceIfStopped) {
      assert executor.inEventLoop();
      if (state == State.ATTEMPT_IN_PROGRESS || state == State.STOP_AFTER_CURRENT) {
        LOG.debug(
            "[{}] reconnectNow and current attempt was still running, letting it complete",
            logPrefix);
        if (state == State.STOP_AFTER_CURRENT) {
          // Make sure that we will schedule other attempts if this one fails.
          state = State.ATTEMPT_IN_PROGRESS;
        }
      } else if (state == State.STOPPED && !forceIfStopped) {
        LOG.debug("[{}] reconnectNow(false) while stopped, nothing to do", logPrefix);
      } else {
        assert state == State.SCHEDULED || (state == State.STOPPED && forceIfStopped);
        LOG.debug("[{}] Forcing next attempt now", logPrefix);
        if (nextAttempt != null) {
          nextAttempt.cancel(true);
        }
        try {
          onNextAttemptStarted(reconnectionTask.call());
        } catch (Exception e) {
          Loggers.warnWithException(
              LOG, "[{}] Uncaught error while starting reconnection attempt", logPrefix, e);
          scheduleNextAttempt();
        }
      }
    }
docs: Forces a reconnection now, without waiting for the next scheduled attempt.
  
  @param forceIfStopped if true and the reconnection is not running, it will get started (meaning
  subsequent reconnections will be scheduled if this attempt fails). If false and the
  reconnection is not running, no attempt is scheduled.