diff --git a/src/daemon/usb_mac.c b/src/daemon/usb_mac.c index fc32c292..4fde3830 100644 --- a/src/daemon/usb_mac.c +++ b/src/daemon/usb_mac.c @@ -75,7 +75,7 @@ static void usbgetstr(usb_dev_t handle, uint8 string_index, char* output, int ou // Hacky way of trying something over and over again until it works. 100ms intervals, max 1s #define wait_loop(error, operation) do { \ int trial = 0; \ - while(((error) = (operation)) != kIOReturnSuccess){ \ + while(((error) = (operation)) != kIOReturnSuccess && ((error) = (operation)) != kIOReturnNoResources){ \ if(++trial == 10) \ break; \ clock_nanosleep(CLOCK_MONOTONIC, 0, &(struct timespec) {.tv_nsec = 100000000}, NULL); \