From 0db9c73d76ae0754ff2f9810e712e2857532d684 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 9 Jun 2019 16:51:39 +0200 Subject: [PATCH] Immediately react to connection termination. --- client/TracyProfiler.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 449f7235..26c21264 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -1224,10 +1224,12 @@ void Profiler::Worker() keepAlive = 0; } - while( m_sock->HasData() ) + bool connActive = true; + while( m_sock->HasData() && connActive ) { - if( !HandleServerQuery() ) break; + connActive = HandleServerQuery(); } + if( !connActive ) break; } if( ShouldExit() ) break;