diff --git a/lib/src/phy/rf/rf_uhd_imp.c b/lib/src/phy/rf/rf_uhd_imp.c index 7fe291497..cb06af9af 100644 --- a/lib/src/phy/rf/rf_uhd_imp.c +++ b/lib/src/phy/rf/rf_uhd_imp.c @@ -615,8 +615,11 @@ int rf_uhd_close(void *h) uhd_tx_metadata_free(&handler->tx_md); uhd_rx_metadata_free(&handler->rx_md_first); uhd_rx_metadata_free(&handler->rx_md); + +#if HAVE_ASYNC_THREAD handler->async_thread_running = false; pthread_join(handler->async_thread, NULL); +#endif uhd_tx_streamer_free(&handler->tx_stream); uhd_rx_streamer_free(&handler->rx_stream);