Skip to content

Commit

Permalink
feat: CircuitBreaker.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
tomguluson92 authored Dec 19, 2024
1 parent 81d0273 commit b8f9d81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/database/CircuitBreaker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class CircuitBreaker {
this.failureCount++;
this.lastFailureTime = Date.now();

if (this.failureCount >= this.failureThreshold) {
if (this.state !== "OPEN" && this.failureCount >= this.failureThreshold) {
this.state = "OPEN";
}
}
Expand Down

0 comments on commit b8f9d81

Please sign in to comment.