Skip to content

Commit

Permalink
Fix bug that attempts is always 0 in delete_with_retry
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Yiyang <cyyzero@qq.com>
  • Loading branch information
cyyzero committed Aug 18, 2022
1 parent 06e9beb commit 9656806
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/libcgroups/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9656806

Please sign in to comment.