diff --git a/usb_device_detection.c b/usb_device_detection.c index d466840..4da9dae 100644 --- a/usb_device_detection.c +++ b/usb_device_detection.c @@ -28,7 +28,7 @@ static int libusb_event_handler(void* data) while (!detector->event_handler_should_exit) { thrd_sleep(&(struct timespec){.tv_sec = 1}, NULL); - libusb_handle_events(detector->usb_context); + libusb_handle_events_completed(detector->usb_context, NULL); } return 0;