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

retry operator hangs in infinite loop when undefined passed as count #2800

Closed
artaommahe opened this issue Aug 18, 2017 · 2 comments
Closed

Comments

@artaommahe
Copy link

RxJS version:
5.4.2

Code to reproduce:

const count: number;

Observable.throw(null)
  .do(() => null, () => console.log('ERROR'))
  .retry(count)
  .subscribe();

Expected behavior:
No retries, single ERROR in console

Actual behavior:
Infinite retries

Additional information:
It's case when we passed retries count from above and it can be undefined.

@kwonoj
Copy link
Member

kwonoj commented Aug 18, 2017

For me this is similar cases to #2144 (comment), in general you can't expect default behavior with unexepcted input value, in this case undefined. retry strictly requires number as parameter and caller should ensure input, either providing 0 to get no retry behavior or certain other numbers.

@kwonoj kwonoj closed this as completed Aug 18, 2017
@lock
Copy link

lock bot commented Jun 6, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants