From e2d42fae2f421c8f3afce30fb2d55a3203c78375 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 9 Jun 2019 16:22:48 +0200 Subject: [PATCH] We're done here, don't try to send termination request. --- client/TracyProfiler.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 6716ddbc..f904115c 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -1291,7 +1291,8 @@ void Profiler::Worker() const auto serialStatus = DequeueSerial(); if( status == DequeueStatus::ConnectionLost || serialStatus == DequeueStatus::ConnectionLost ) { - break; + m_shutdownFinished.store( true, std::memory_order_relaxed ); + return; } else if( status == DequeueStatus::QueueEmpty && serialStatus == DequeueStatus::QueueEmpty ) { @@ -1301,7 +1302,11 @@ void Profiler::Worker() while( m_sock->HasData() ) { - if( !HandleServerQuery() ) break; + if( !HandleServerQuery() ) + { + m_shutdownFinished.store( true, std::memory_order_relaxed ); + return; + } } }