mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
add some delays if error
This commit is contained in:
parent
5d5a21ba2d
commit
bb94930196
|
@ -42,11 +42,11 @@ func RetryForever(name string, job func() error, onErrFn func(err error) bool) {
|
|||
if onErrFn(err) {
|
||||
if strings.Contains(err.Error(), "transport") {
|
||||
glog.V(0).Infof("retry %s: err: %v", name, err)
|
||||
}
|
||||
time.Sleep(waitTime)
|
||||
if waitTime < RetryWaitTime {
|
||||
waitTime += waitTime / 2
|
||||
}
|
||||
}
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue