1
0
mirror of https://github.com/containers/youki synced 2024-11-26 14:13:49 +01:00

Merge pull request #1128 from cyyzero/fix_delete_retry

Fix bug that attempts is always 0 in delete_with_retry
This commit is contained in:
Thomas Schubart 2022-08-22 15:48:27 +02:00 committed by GitHub
commit c16a1cb009
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

@ -420,7 +420,7 @@ pub(crate) fn delete_with_retry<P: AsRef<Path>, L: Into<Option<Duration>>>(
}
std::thread::sleep(delay);
attempts += attempts;
attempts += 1;
delay *= attempts;
if delay > limit {
delay = limit;