From 496f866add2df003aee2bbf1ae637dd52f17c56f Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 9 Jun 2019 16:19:40 +0200 Subject: [PATCH] Don't send data when connection is terminated. There are only two cases for which HandleServerQuery() returns false. Either data can't be read from the socket (which is checked by HasData() call before calling HandleServerQuery()), or if the server sent termination query. In both these cases there's no need to send data anymore. --- client/TracyProfiler.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index bb89b5ff..6716ddbc 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -1322,7 +1322,6 @@ void Profiler::Worker() { if( !HandleServerQuery() ) { - if( m_bufferOffset != m_bufferStart ) CommitData(); m_shutdownFinished.store( true, std::memory_order_relaxed ); return; }