lib: force wait state after cancel of usb transfer

..and before handling usb events

This avoids an occasional crash when closing the device on Windows.
Also see
This commit is contained in:
jvde.github 2022-01-08 13:30:34 +01:00 committed by Steve Markgraf
parent d770add42e
commit 2659e2df31
1 changed files with 3 additions and 0 deletions

View File

@ -1930,6 +1930,9 @@ int rtlsdr_read_async(rtlsdr_dev_t *dev, rtlsdr_read_async_cb_t cb, void *ctx,
/* handle events after canceling
* to allow transfer status to
* propagate */
#ifdef _WIN32
&zerotv, NULL);
if (r < 0)