Merge pull request #516 from pzread/fix-conn-check

Fix connection check for capturing
This commit is contained in:
Bartosz Taudul 2023-01-25 13:05:27 +01:00 committed by GitHub
commit 9788a76473
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,7 +159,7 @@ int main( int argc, char** argv )
printf( "Connecting to %s:%i...", address, port );
fflush( stdout );
tracy::Worker worker( address, port );
while( !worker.IsConnected() )
while( !worker.HasData() )
{
const auto handshake = worker.GetHandshakeStatus();
if( handshake == tracy::HandshakeProtocolMismatch )
@ -179,7 +179,6 @@ int main( int argc, char** argv )
}
std::this_thread::sleep_for( std::chrono::milliseconds( 100 ) );
}
while( !worker.HasData() ) std::this_thread::sleep_for( std::chrono::milliseconds( 100 ) );
printf( "\nQueue delay: %s\nTimer resolution: %s\n", tracy::TimeToString( worker.GetDelay() ), tracy::TimeToString( worker.GetResolution() ) );
#ifdef _WIN32