From 43754377e8d3c92ea081c5f3d0136cab9482b7c0 Mon Sep 17 00:00:00 2001 From: xing Date: Tue, 25 Apr 2023 21:05:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/cmd/reload/reload.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cmd/reload/reload.go b/internal/cmd/reload/reload.go index 160a5b3..2943072 100644 --- a/internal/cmd/reload/reload.go +++ b/internal/cmd/reload/reload.go @@ -128,7 +128,7 @@ func GetAnyValBy[T, A any](namespace string, tryTimes int, a A, fn func(A) (T, b } v.v, ok = fn(a) times := v.counter() - if ok || times == tryTimes { + if ok || times >= tryTimes { v.ok = true vv.Val.Store(v) }