Skip to content

Commit

Permalink
Reset half opens counter when breaker resets
Browse files Browse the repository at this point in the history
  • Loading branch information
rubyist committed Oct 29, 2014
1 parent 8578b1e commit 635d498
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions circuitbreaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ func (cb *Breaker) Trip() {
func (cb *Breaker) Reset() {
atomic.StoreInt32(&cb.broken, 0)
atomic.StoreInt32(&cb.tripped, 0)
atomic.StoreInt64(&cb.halfOpens, 0)
cb.ResetCounters()
cb.sendEvent(BreakerReset)
}
Expand Down

0 comments on commit 635d498

Please sign in to comment.