rubyist / circuitbreaker

Circuit Breakers in Go
MIT License
1.12k stars 109 forks source link

Set Backoff.MaxElapsedTime 0 as a default #32

Closed matope closed 8 years ago

matope commented 8 years ago

Hi, guys.

We are using rubyst/circuitbreaker in my app. We've found that our network client that wrapping rubyst/circuitbreaker doesn't start to request to the server that recovered from a long failure (>=15min).

After some investigation, We found that Breaker stop retrying. That's because backoff.Backoff started returning backoff.Stop if it would kept open longer than 15 minutes as a default and #30 respect the response.

But I think many users expect CircuitBreaker implementations to retry forever and close itself it it could. So, in order to avoid error-prone, I'd like to change default behavior of Breaker to retry forever when it is opened.

Could you please consider my proposal?

rubyist commented 8 years ago

This seems reasonable, sorry I took so long getting to this. Thanks for the PR!