1
0
Fork 0
mirror of https://github.com/tmrts/go-patterns.git synced 2025-04-02 20:56:12 +03:00

add missing return value

This commit is contained in:
Jeff 2019-12-20 15:27:02 +08:00
parent f978e42036
commit 65c5f28529
No known key found for this signature in database
GPG key ID: 87272103ED9C5218

View file

@ -67,7 +67,7 @@ func Breaker(c Circuit, failureThreshold uint32) Circuit {
return func(ctx context) error {
if cnt.ConsecutiveFailures() >= failureThreshold {
canRetry := func(cnt Counter) {
canRetry := func(cnt Counter) bool {
backoffLevel := Cnt.ConsecutiveFailures() - failureThreshold
// Calculates when should the circuit breaker resume propagating requests