From 08b20ba4b2964ede8e61ea4adbeaa1b0ee8d122c Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Tue, 25 Jan 2022 19:42:50 +0100 Subject: [PATCH] srsue,phy: change stop order to avoid locking --- srsue/src/phy/sync.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srsue/src/phy/sync.cc b/srsue/src/phy/sync.cc index e46ae3f34..58cef2815 100644 --- a/srsue/src/phy/sync.cc +++ b/srsue/src/phy/sync.cc @@ -128,14 +128,14 @@ sync::~sync() void sync::stop() { + running = false; + wait_thread_finish(); + std::lock_guard 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();