fix stopping of async thread in UHD

This commit is contained in:
Andre Puschmann 2018-07-26 14:20:40 +02:00
parent 74e38ee0a2
commit e6366b4570
1 changed files with 4 additions and 2 deletions

View File

@ -618,8 +618,10 @@ int rf_uhd_close(void *h)
uhd_rx_metadata_free(&handler->rx_md);
#if HAVE_ASYNC_THREAD
handler->async_thread_running = false;
pthread_join(handler->async_thread, NULL);
if (handler->async_thread_running) {
handler->async_thread_running = false;
pthread_join(handler->async_thread, NULL);
}
#endif
uhd_tx_streamer_free(&handler->tx_stream);