Merge pull request #1166 from martinling/tx-disconnect-hang
Fix hang in TX when a libusb error occurs.
This commit is contained in:
@ -1830,9 +1830,16 @@ hackrf_libusb_transfer_callback(struct libusb_transfer* usb_transfer)
|
|||||||
if (resubmit && result == LIBUSB_SUCCESS)
|
if (resubmit && result == LIBUSB_SUCCESS)
|
||||||
return;
|
return;
|
||||||
} else if (device->flush) {
|
} else if (device->flush) {
|
||||||
libusb_submit_transfer(device->flush_transfer);
|
result = libusb_submit_transfer(device->flush_transfer);
|
||||||
|
if (result != LIBUSB_SUCCESS) {
|
||||||
|
device->streaming = false;
|
||||||
|
device->flush = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
device->streaming = false;
|
||||||
|
device->flush = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Unless we resubmitted this transfer and returned above,
|
// Unless we resubmitted this transfer and returned above,
|
||||||
// it's now finished.
|
// it's now finished.
|
||||||
|
Reference in New Issue
Block a user