Change order of radio stop to avoid locking on rf_ms() by async thread

master
Ismael Gomez 6 years ago
parent 2574de4d2d
commit 50e1ed6cc6

@ -120,13 +120,13 @@ int radio_multi::init(const rf_args_t& args_, phy_interface_radio* phy_)
void radio_multi::stop()
{
if (running) {
std::lock_guard<std::mutex> lock(radio_instance_mutex);
instance = nullptr;
for (auto& radio : radios) {
radio->stop();
}
std::lock_guard<std::mutex> lock(radio_instance_mutex);
instance = nullptr;
running = false;
}
}

Loading…
Cancel
Save