mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
refactor
This commit is contained in:
parent
046c3d5ad4
commit
da9d3e8f6c
|
@ -79,11 +79,10 @@ func StreamContent(masterClient wdclient.HasLookupFileIdFunction, writer io.Writ
|
||||||
var err error
|
var err error
|
||||||
for _, backoff := range getLookupFileIdBackoffSchedule {
|
for _, backoff := range getLookupFileIdBackoffSchedule {
|
||||||
urlStrings, err = masterClient.GetLookupFileIdFunction()(chunkView.FileId)
|
urlStrings, err = masterClient.GetLookupFileIdFunction()(chunkView.FileId)
|
||||||
if err != nil || len(urlStrings) == 0 {
|
if err == nil && len(urlStrings) > 0 {
|
||||||
time.Sleep(backoff)
|
|
||||||
} else {
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
time.Sleep(backoff)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.V(1).Infof("operation LookupFileId %s failed, err: %v", chunkView.FileId, err)
|
glog.V(1).Infof("operation LookupFileId %s failed, err: %v", chunkView.FileId, err)
|
||||||
|
|
Loading…
Reference in a new issue