From 9e1cb5c0032120ca2fcbf5452afa86a27a7b1805 Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Fri, 18 Mar 2022 00:43:24 +0000 Subject: [PATCH] Don't exit transfer thread if an error occurs. In the case of a libusb error, we still need the transfer thread running, in order to handle outstanding cancellations and to signal the condition variable when that is done. --- host/libhackrf/src/hackrf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/libhackrf/src/hackrf.c b/host/libhackrf/src/hackrf.c index c0062f4b..6671bc37 100644 --- a/host/libhackrf/src/hackrf.c +++ b/host/libhackrf/src/hackrf.c @@ -1766,7 +1766,7 @@ static void LIBUSB_CALL hackrf_libusb_transfer_callback(struct libusb_transfer* LIBUSB_TRANSFER_ERROR, LIBUSB_TRANSFER_TIMED_OUT LIBUSB_TRANSFER_STALL, LIBUSB_TRANSFER_OVERFLOW .... */ - request_exit(device); /* Fatal error stop transfer */ + transfer_finished(device, usb_transfer); device->streaming = false; } }