mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
retry for all errors
This commit is contained in:
parent
649555b223
commit
f7e0a65e75
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue