Browse Source

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

Con Kolivas 12 years ago
parent
commit
4c979d756f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      cgminer.c

+ 2 - 1
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
 	/* Keep event handling going until there are no async transfers in
 	 * flight. */
 	 * flight. */
-	while (async_usb_transfers())
+	do {
 		libusb_handle_events_timeout_completed(NULL, &tv_end, NULL);
 		libusb_handle_events_timeout_completed(NULL, &tv_end, NULL);
+	} while (async_usb_transfers());
 
 
 	return NULL;
 	return NULL;
 }
 }