Skip to content

Commit 91442e2

Browse files
committed
afk: Increase timeout from 500 loops to 500ms (time-based)
This should hopefully solve the reliability issues here. Signed-off-by: Hector Martin <marcan@marcan.st>
1 parent 1f1826d commit 91442e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/afk.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,9 @@ int afk_epic_start_interface(afk_epic_ep_t *epic, void *intf, int expected, size
722722
break;
723723
}
724724

725-
for (int tries = 0; tries < 500; tries += 1) {
725+
u64 timeout = timeout_calculate(500000);
726+
727+
while (!timeout_expired(timeout)) {
726728
s64 epic_unit = -1;
727729
char *epic_name = NULL;
728730
char *epic_class = NULL;

0 commit comments

Comments
 (0)