From 65c5f28529228b3d019271995858e2f35fa6117b Mon Sep 17 00:00:00 2001 From: Jeff Date: Fri, 20 Dec 2019 15:27:02 +0800 Subject: [PATCH] add missing return value --- stability/circuit-breaker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stability/circuit-breaker.md b/stability/circuit-breaker.md index 66b0487..aa4c49e 100644 --- a/stability/circuit-breaker.md +++ b/stability/circuit-breaker.md @@ -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