-
Notifications
You must be signed in to change notification settings - Fork 451
Open
Labels
WindowsRelated to Windows backendRelated to Windows backend
Description
This piece of if-judgment code needs to add the call to the CancelIo function. Otherwise, after WaitForSingleObject times out and returns, WriteFile may fail with a certain probability and keep being stuck in the IO_PENDING state. It is necessary to add the CancelIo operation to continue sending data normally.
eg :
if (res != WAIT_OBJECT_0) {
/* There was a Timeout. */
CancelIo(dev->device_handle); // add function
register_winapi_error(dev, L"hid_write/WaitForSingleObject");
goto end_of_function;
}
Metadata
Metadata
Assignees
Labels
WindowsRelated to Windows backendRelated to Windows backend