Skip to content

Incorrect timeout handling in _waitForActionServerToStart of ActionClientInterface #179

Description

@tziem

I think the timeout handling in _waitForActionServerToStart of ActionClientInterface is incorrect.
No matter how big the timeout value is, the method comes back immediately with false.

 _waitForActionServerToStart(timeoutMs, start) {
    return setTimeoutP(100)
    .then(() => {
      if (this.isServerConnected()) {
        return true;
      }
      else if (timeoutMs > 0 && start + timeoutMs > Date.now()) {
        return false;
      }
      else {
        return this._waitForActionServerToStart(timeoutMs, start);
      }
    });
  }

If I'm not wrong, the if statement should be:

if (timeoutMs > 0 && start + timeoutMs < Date.now())

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions