From fce132d266bff2139e54345c2ac36866c6f9b627 Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Thu, 6 Jun 2013 22:55:06 +0200 Subject: [PATCH] libhackrf: Fix early exit of transfer thread in case of syscal interruption libusb can return LIBUSB_ERROR_INTERRUPTED and it's not really an error, just a sign some syscall got interrupted by something. Don't abort on that. Signed-off-by: Sylvain Munaut --- 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 410f8f3b..67c2d97b 100644 --- a/host/libhackrf/src/hackrf.c +++ b/host/libhackrf/src/hackrf.c @@ -894,7 +894,7 @@ static void* transfer_threadproc(void* arg) while( (device->streaming) && (do_exit == false) ) { error = libusb_handle_events_timeout(g_libusb_context, &timeout); - if( error != 0 ) + if( (error != 0) && (error != LIBUSB_ERROR_INTERRUPTED) ) { device->streaming = false; }