Merge pull request #3364 from kmlebedev/fix_login_else

This commit is contained in:
Chris Lu 2022-07-26 07:44:03 -07:00 committed by GitHub
commit e05641291e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,10 +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)
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)