Skip to content

Commit

Permalink
Merge pull request #101 from thiagobustamante/master
Browse files Browse the repository at this point in the history
Fix circuitbreaker timeWindow
  • Loading branch information
thiagobustamante committed Jan 25, 2018
2 parents af9a797 + 7162aa8 commit ace42fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/circuitbreaker/redis-state-handler.ts
Expand Up @@ -25,7 +25,9 @@ export class RedisStateHandler implements StateHandler {
constructor(id: string, resetTimeout: number, timeWindow?: number) {
this.id = id;
this.resetTimeout = resetTimeout;
this.timeWindow = timeWindow;
if (timeWindow) {
this.timeWindow = timeWindow / 1000;
}
}

initialState() {
Expand Down

0 comments on commit ace42fd

Please sign in to comment.