From 55615d2cdf60ad3df5c89dd74ac06a21d3454918 Mon Sep 17 00:00:00 2001 From: ty-l Date: Wed, 17 Oct 2018 15:35:40 +0800 Subject: [PATCH] Update circuit-breaker.md --- 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