From 7be12b8bb5d682687890588e800733c264fab446 Mon Sep 17 00:00:00 2001 From: Finn Williams Date: Thu, 31 Oct 2019 11:15:06 +0000 Subject: IVGCVSW-4049 Fix potential threading issue with the SendCounterPacket thread Signed-off-by: Finn Williams Change-Id: I311270dac0ba90b04e3488572e6b045546114a12 --- src/profiling/SendCounterPacket.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/profiling/SendCounterPacket.cpp b/src/profiling/SendCounterPacket.cpp index 382f958fca..dcba156e93 100644 --- a/src/profiling/SendCounterPacket.cpp +++ b/src/profiling/SendCounterPacket.cpp @@ -916,6 +916,11 @@ void SendCounterPacket::Start(IProfilingConnection& profilingConnection) return; } + if (m_SendThread.joinable()) + { + m_SendThread.join(); + } + // Mark the send thread as running m_IsRunning.store(true); -- cgit v1.2.1