Skip to content

Commit

Permalink
afk: Increase timeout from 500 loops to 500ms (time-based)
Browse files Browse the repository at this point in the history
This should hopefully solve the reliability issues here.

Signed-off-by: Hector Martin <[email protected]>
  • Loading branch information
marcan committed Nov 2, 2023
1 parent 1f1826d commit 91442e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/afk.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,9 @@ int afk_epic_start_interface(afk_epic_ep_t *epic, void *intf, int expected, size
break;
}

for (int tries = 0; tries < 500; tries += 1) {
u64 timeout = timeout_calculate(500000);

while (!timeout_expired(timeout)) {
s64 epic_unit = -1;
char *epic_name = NULL;
char *epic_class = NULL;
Expand Down

0 comments on commit 91442e2

Please sign in to comment.