Skip to content

Commit a601fd2

Browse files
committed
Clear errors when closing circuit upon reaching success_threshold
1 parent 68d672c commit a601fd2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/redis_client/circuit_breaker.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def record_success
100100

101101
@successes += 1
102102
if @successes >= @success_threshold
103+
@errors.clear
103104
@state = :closed
104105
end
105106
end

0 commit comments

Comments
 (0)