1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-06-25 20:09:30 +02:00

reset wait time on a successful retry

This commit is contained in:
chrislu 2023-05-07 23:39:33 -07:00
parent 59f55c1a66
commit 25b237b83c

View file

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