From 4b7253050299eb7c1993b158a25d95debcb6fa11 Mon Sep 17 00:00:00 2001 From: jrd Date: Sun, 30 Aug 2026 15:33:33 +0000 Subject: [PATCH] channel.h: make bIsIdentified atomic bIsIdentified is written on the socket thread, by ResetInfo from CServer::InitChannel on every new connection and by SetChanInfo when channel info arrives, and read on the mix path in PrepAndSendPacket, which runs after the CServer::Mutex region in OnTimer has been released. No lock covers that pair, and ThreadSanitizer reports it as a data race. bIsEnabled just above it is already std::atomic. Nothing is added to the audio deadline path: the mix-thread read stays a plain load with no lock prefix and no fence. --- src/channel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/channel.h b/src/channel.h index 946eae007a..93c612a57a 100644 --- a/src/channel.h +++ b/src/channel.h @@ -239,7 +239,7 @@ class CChannel : public QObject std::atomic bIsEnabled; bool bIsServer; - bool bIsIdentified; + std::atomic bIsIdentified; int iNetwFrameSizeFact; int iNetwFrameSize;