Browse Source

reset wait time on a successful retry

pull/4453/head
chrislu 2 years ago
parent
commit
25b237b83c
  1. 2
      weed/util/retry.go

2
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) {

Loading…
Cancel
Save