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.
This commit is contained in:
Bartosz Taudul 2019-06-09 16:19:40 +02:00
parent 23e7850162
commit 496f866add

View File

@ -1322,7 +1322,6 @@ void Profiler::Worker()
{
if( !HandleServerQuery() )
{
if( m_bufferOffset != m_bufferStart ) CommitData();
m_shutdownFinished.store( true, std::memory_order_relaxed );
return;
}