Browse Source

do not retry if failed with a non transport related error

pull/1650/head
Chris Lu 4 years ago
parent
commit
a102157020
  1. 4
      weed/util/retry.go

4
weed/util/retry.go

@ -22,9 +22,11 @@ func Retry(name string, job func() error) (err error) {
}
if strings.Contains(err.Error(), "transport") {
hasErr = true
glog.V(0).Infof("retry %s", name)
glog.V(0).Infof("retry %s: err: %v", name, err)
time.Sleep(waitTime)
waitTime += waitTime / 2
} else {
break
}
}
return err

Loading…
Cancel
Save