mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-28 05:15:00 +08: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 New Issue
Block a user