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

Inconsistencies between documentation and circuit closing #381

Closed
laurivaananenDH opened this issue Oct 24, 2019 · 2 comments · Fixed by #382
Closed

Inconsistencies between documentation and circuit closing #381

laurivaananenDH opened this issue Oct 24, 2019 · 2 comments · Fixed by #382
Assignees
Labels

Comments

@laurivaananenDH
Copy link

According to the documentation the circuit should close after opening after the options.resetTimeout has elapsed and a successful attempt. In our case this was not the case. We are using the circuit with http requests. We noticed that any pending promise resolving with a success will close the circuit even if the options.resetTimeout has not elapsed.

What I think is happening:

  1. Circuit opens while there are still pending promises.
  2. options.resetTimeout starts to count down.
  3. One of the pending promises resolves while the options.resetTimeout has not yet run out.
  4. Circuit closes.

Is this an expected behavior of the circuit?

@lance
Copy link
Member

lance commented Oct 25, 2019

This does not sound like the expected behavior. Is there any chance you can provide a small code sample that illustrates this?

@tjenkinson
Copy link
Contributor

Yep was able to reproduce it in a test in #382

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants