mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
do not retry if failed with a non transport related error
This commit is contained in:
parent
b3adb221b2
commit
a102157020
|
@ -22,9 +22,11 @@ func Retry(name string, job func() error) (err error) {
|
|||
}
|
||||
if strings.Contains(err.Error(), "transport") {
|
||||
hasErr = true
|
||||
glog.V(0).Infof("retry %s", name)
|
||||
glog.V(0).Infof("retry %s: err: %v", name, err)
|
||||
time.Sleep(waitTime)
|
||||
waitTime += waitTime / 2
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue