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) {
|
if err != nil && !os.IsNotExist(err) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
if i == maxRetries-1 {
|
||||||
|
break
|
||||||
|
}
|
||||||
time.Sleep(time.Second)
|
time.Sleep(time.Second)
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -84,6 +84,9 @@ func waitForPath(pool, image string, maxRetries int) (string, bool) {
|
||||||
if found {
|
if found {
|
||||||
return devicePath, true
|
return devicePath, true
|
||||||
}
|
}
|
||||||
|
if i == maxRetries-1 {
|
||||||
|
break
|
||||||
|
}
|
||||||
time.Sleep(time.Second)
|
time.Sleep(time.Second)
|
||||||
}
|
}
|
||||||
return "", false
|
return "", false
|
||||||
|
|
Loading…
Reference in New Issue