diff --git a/device/win_usb/win_usb.cpp b/device/win_usb/win_usb.cpp index 9a7ca99..da17ab4 100644 --- a/device/win_usb/win_usb.cpp +++ b/device/win_usb/win_usb.cpp @@ -834,7 +834,13 @@ int usb_device::transfer_bulk(unsigned endpoint, unsigned char* data, int* lengt { GetOverlappedResult(h, oc->over_lapped(), oc->io_bytes(), FALSE); *length = *oc->io_bytes(); - ret = LIBUSB_SUCCESS; + if (*length == 0 && oc->over_lapped()->Internal != ERROR_SUCCESS) + { + ret = LIBUSB_ERROR_IO; + VLOG_MINI_2(LOG_LEVEL_WARNING, "Bulk-Transfer of endpoint 0x%02x failed with code 0x%08X\n", endpoint, oc->over_lapped()->Internal); + } + else + ret = LIBUSB_SUCCESS; } else ret = LIBUSB_ERROR_TIMEOUT;