From 7b092956c09f5518db6f0f6afde48dd2b679abcb Mon Sep 17 00:00:00 2001 From: Hayodea Hekol Date: Fri, 7 Nov 2025 21:12:40 -0400 Subject: [PATCH] UdpCmdDemux: Guard start() w/spinlock for races --- commonLibs/livoxProto1/udpCommandDemuxer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commonLibs/livoxProto1/udpCommandDemuxer.cpp b/commonLibs/livoxProto1/udpCommandDemuxer.cpp index b8e6330..453e47d 100644 --- a/commonLibs/livoxProto1/udpCommandDemuxer.cpp +++ b/commonLibs/livoxProto1/udpCommandDemuxer.cpp @@ -43,9 +43,10 @@ void UdpCommandDemuxer::start() try { - setupSockets(); { smo::SpinLock::Guard lock(isActiveAndShouldStopLock); + + setupSockets(); isActive.store(true); shouldStop.store(false); }