Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect timeout handling in _waitForActionServerToStart of ActionClientInterface #179

Open
tziem opened this issue Jun 23, 2021 · 0 comments

Comments

@tziem
Copy link

tziem commented Jun 23, 2021

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())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant