diff options
-rw-r--r-- | src/rtl_adsb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rtl_adsb.c b/src/rtl_adsb.c index 07fdd2a..9087de4 100644 --- a/src/rtl_adsb.c +++ b/src/rtl_adsb.c @@ -492,6 +492,8 @@ int main(int argc, char **argv) else { fprintf(stderr, "\nLibrary error %d, exiting...\n", r);} rtlsdr_cancel_async(dev); + pthread_cancel(demod_thread); + pthread_join(demod_thread, NULL); pthread_cond_destroy(&ready); pthread_mutex_destroy(&ready_m); |