Merge pull request #39075 from ChenLingPeng/github-waitfor

Automatic merge from submit-queue

no need to sleep for last retry

break for needless sleep
This commit is contained in:
Kubernetes Submit Queue 2017-01-03 07:26:00 -08:00 committed by GitHub
commit 85bf256709
2 changed files with 6 additions and 0 deletions

View File

@ -58,6 +58,9 @@ func waitForPathToExistInternal(devicePath string, maxRetries int, deviceTranspo
if err != nil && !os.IsNotExist(err) {
return false
}
if i == maxRetries-1 {
break
}
time.Sleep(time.Second)
}
return false

View File

@ -84,6 +84,9 @@ func waitForPath(pool, image string, maxRetries int) (string, bool) {
if found {
return devicePath, true
}
if i == maxRetries-1 {
break
}
time.Sleep(time.Second)
}
return "", false