Commit 4c979d756fb94b28317d01b10aec02b647fbcf81

Con Kolivas 2013-10-25T12:46:47

Do one extra guaranteed libusb event handling before testing if there are any pending async usb transfers.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/cgminer.c b/cgminer.c
index 44b51c5..993ad32 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -7842,8 +7842,9 @@ static void *libusb_poll_thread(void __maybe_unused *arg)
 
 	/* Keep event handling going until there are no async transfers in
 	 * flight. */
-	while (async_usb_transfers())
+	do {
 		libusb_handle_events_timeout_completed(NULL, &tv_end, NULL);
+	} while (async_usb_transfers());
 
 	return NULL;
 }