Bug:UdpCmdDemux: Add SpinLock for races around stop()

This commit is contained in:
2025-11-07 20:45:16 -04:00
parent 7d2cb58200
commit 887fa1ab6f
2 changed files with 15 additions and 5 deletions
@@ -6,6 +6,7 @@
#include <memory>
#include <boost/asio/posix/stream_descriptor.hpp>
#include <componentThread.h>
#include <spinLock.h>
namespace livoxProto1 {
@@ -81,6 +82,7 @@ private:
uint16_t dataPort;
// State management
smo::SpinLock isActiveAndShouldStopLock;
std::atomic<bool> isActive{false};
std::atomic<bool> shouldStop{false};