Hey @obj, i remember having to kill -9 in case dump1090-fa reported wedging or the rtl-sdr.
Maybe rtlsdr_cancel_async(RTLSDR.dev) would be a good idea when the SDR doesn’t give back samples for maybe 5 seconds?
Also it might make sense to not pthread_join the readerThread but rather pthread_timedjoin_np with a 10 second timeout? (and exit without cleanup when it fails)
An patch along those lines might work: (untested. also i know the code changed but you get the picture)