mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 14:14:39 +00:00
no need to sleep for last retry
Signed-off-by: forrestchen <forrestchen@tencent.com>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user