From bf7391668c4c92d28aef6106ce1590adec135200 Mon Sep 17 00:00:00 2001 From: consti10 Date: Thu, 1 Feb 2024 17:33:16 +0100 Subject: [PATCH] optimize threading of dummy link --- src/dummy_link/DummyLink.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dummy_link/DummyLink.cpp b/src/dummy_link/DummyLink.cpp index 2b3fefef..e9519819 100644 --- a/src/dummy_link/DummyLink.cpp +++ b/src/dummy_link/DummyLink.cpp @@ -90,10 +90,11 @@ DummyLink::DummyLink(bool is_air):m_is_air(is_air) { } DummyLink::~DummyLink() { - close(m_fd_rx); m_keep_receiving= false; + close(m_fd_rx); m_receive_thread->join(); m_receive_thread= nullptr; + close(m_fd_tx); } void DummyLink::tx_radiotap(const uint8_t *packet_buff, int packet_size) {