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();