Commit 85bf2567 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #39075 from ChenLingPeng/github-waitfor

Automatic merge from submit-queue no need to sleep for last retry break for needless sleep
parents 2d154999 1d9f7545
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment