Skip to content

Commit

Permalink
Limit retries to 10 attempts
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <[email protected]>
  • Loading branch information
Alan Jowett committed Sep 6, 2024
1 parent e2398b4 commit 1a17371
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/api_test/api_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static _Success_(return == 0) int _program_load_helper(
}

int error;
for (;;) {
for (size_t retries = 0; retries < 10; retries++) {
error = bpf_object__load(new_object);
if (error == -EBUSY) {
// Wait for the previous driver to be unloaded.
Expand Down

0 comments on commit 1a17371

Please sign in to comment.