From 76aceca22fc1cf06a3085e9c157a67f47ebd6224 Mon Sep 17 00:00:00 2001 From: xigang Date: Wed, 24 Jul 2019 09:42:13 +0800 Subject: [PATCH] bugfix: panic log params in the construct method when maxInterval is less than minInterval --- pkg/util/async/bounded_frequency_runner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/util/async/bounded_frequency_runner.go b/pkg/util/async/bounded_frequency_runner.go index 20a06ad668a..5d74d53b13c 100644 --- a/pkg/util/async/bounded_frequency_runner.go +++ b/pkg/util/async/bounded_frequency_runner.go @@ -140,7 +140,7 @@ func NewBoundedFrequencyRunner(name string, fn func(), minInterval, maxInterval // Make an instance with dependencies injected. func construct(name string, fn func(), minInterval, maxInterval time.Duration, burstRuns int, timer timer) *BoundedFrequencyRunner { if maxInterval < minInterval { - panic(fmt.Sprintf("%s: maxInterval (%v) must be >= minInterval (%v)", name, minInterval, maxInterval)) + panic(fmt.Sprintf("%s: maxInterval (%v) must be >= minInterval (%v)", name, maxInterval, minInterval)) } if timer == nil { panic(fmt.Sprintf("%s: timer must be non-nil", name))