From 25b237b83ca38854154cf4ea3f76ae892fa88b12 Mon Sep 17 00:00:00 2001 From: chrislu Date: Sun, 7 May 2023 23:39:33 -0700 Subject: [PATCH] reset wait time on a successful retry --- weed/util/retry.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/weed/util/retry.go b/weed/util/retry.go index 6be052f77..997fa5d13 100644 --- a/weed/util/retry.go +++ b/weed/util/retry.go @@ -18,6 +18,7 @@ func Retry(name string, job func() error) (err error) { if hasErr { glog.V(0).Infof("retry %s successfully", name) } + waitTime = time.Second break } if strings.Contains(err.Error(), "transport") { @@ -41,6 +42,7 @@ func MultiRetry(name string, errList []string, job func() error) (err error) { if hasErr { glog.V(0).Infof("retry %s successfully", name) } + waitTime = time.Second break } if containErr(err.Error(), errList) {