Skip to content

Commit

Permalink
fix: don't let circuits get stuck half open
Browse files Browse the repository at this point in the history
Fixes: #57
If a circuit is fired while half open AND while PENDING_CLOSE,
it gets stuck there. This fixes that.
  • Loading branch information
lance authored and lholmquist committed Apr 24, 2017
1 parent c1f3b1b commit 5e1171c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/circuit.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ class CircuitBreaker extends EventEmitter {
return fallback(this, 'Breaker is open', args) ||
Promise.reject(new Error('Breaker is open'));
}
this[PENDING_CLOSE] = this.halfOpen;

let timeout;
let timeoutError = false;
Expand Down

0 comments on commit 5e1171c

Please sign in to comment.