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 }