diff --git a/libusb/os/poll_windows.c b/libusb/os/poll_windows.c index 654965b..bb3d178 100644 --- a/libusb/os/poll_windows.c +++ b/libusb/os/poll_windows.c @@ -149,8 +149,8 @@ static int check_pollfds(struct pollfd *fds, unsigned int nfds, continue; } - // The following macro only works if overlapped I/O was reported pending - if (HasOverlappedIoCompleted(&fd->overlapped)) { + if (HasOverlappedIoCompleted(&fd->overlapped) + && (WaitForSingleObject(fd->overlapped.hEvent, 0) == WAIT_OBJECT_0)) { fds[n].revents = fds[n].events; nready++; } else if (wait_handles != NULL) { diff --git a/libusb/version_nano.h b/libusb/version_nano.h index e40a0dd..eb2eab4 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11298 +#define LIBUSB_NANO 11299