srsue,phy: change stop order to avoid locking

This commit is contained in:
Ismael Gomez 2022-01-25 19:42:50 +01:00
parent be5c3afc51
commit 08b20ba4b2
1 changed files with 3 additions and 3 deletions

View File

@ -128,14 +128,14 @@ sync::~sync()
void sync::stop()
{
running = false;
wait_thread_finish();
std::lock_guard<std::mutex> lock(intra_freq_cfg_mutex);
worker_com->semaphore.wait_all();
for (auto& q : intra_freq_meas) {
q->stop();
}
running = false;
wait_thread_finish();
// Reset (stop Rx stream) as soon as possible to avoid base-band Rx buffer overflow
radio_h->reset();