IVGCVSW-4049 Fix potential threading issue with the SendCounterPacket thread
authorFinn Williams <Finn.Williams@arm.com>
Thu, 31 Oct 2019 11:15:06 +0000 (11:15 +0000)
committerMatteo Martincigh <matteo.martincigh@arm.com>
Thu, 31 Oct 2019 14:07:22 +0000 (14:07 +0000)
Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Change-Id: I311270dac0ba90b04e3488572e6b045546114a12

src/profiling/SendCounterPacket.cpp

index 382f958..dcba156 100644 (file)
@@ -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);