mirror of https://github.com/k3s-io/k3s
no need to sleep for last retry
Signed-off-by: forrestchen <forrestchen@tencent.com>pull/6/head
parent
f9707a7d9b
commit
1d9f754565
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue