From f7e0a65e752f08566c829ce67c4aa8ed1d6dd4f6 Mon Sep 17 00:00:00 2001 From: chrislu Date: Sat, 20 Aug 2022 23:34:45 -0700 Subject: [PATCH] retry for all errors --- weed/util/retry.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/util/retry.go b/weed/util/retry.go index dde4ded63..fee6074b2 100644 --- a/weed/util/retry.go +++ b/weed/util/retry.go @@ -23,11 +23,11 @@ func Retry(name string, job func() error) (err error) { if strings.Contains(err.Error(), "transport") { hasErr = true glog.V(0).Infof("retry %s: err: %v", name, err) - time.Sleep(waitTime) - waitTime += waitTime / 2 } else { break } + time.Sleep(waitTime) + waitTime += waitTime / 2 } return err }