mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Make easy check first.
This commit is contained in:
parent
d691cb2a06
commit
5ae9e791a5
@ -3235,7 +3235,7 @@ void Worker::Exec()
|
||||
m_netWriteCv.notify_one();
|
||||
}
|
||||
|
||||
if( !m_serverQueryQueue.empty() && m_serverQuerySpaceLeft > 0 )
|
||||
if( m_serverQuerySpaceLeft > 0 && !m_serverQueryQueue.empty() )
|
||||
{
|
||||
const auto toSend = std::min( m_serverQuerySpaceLeft, m_serverQueryQueue.size() );
|
||||
m_sock.Send( m_serverQueryQueue.data(), toSend * ServerQueryPacketSize );
|
||||
@ -3363,7 +3363,7 @@ void Worker::HandleFailure( const char* ptr, const char* end )
|
||||
m_netWriteCv.notify_one();
|
||||
}
|
||||
|
||||
if( !m_serverQueryQueue.empty() && m_serverQuerySpaceLeft > 0 )
|
||||
if( m_serverQuerySpaceLeft > 0 && !m_serverQueryQueue.empty() )
|
||||
{
|
||||
const auto toSend = std::min( m_serverQuerySpaceLeft, m_serverQueryQueue.size() );
|
||||
m_sock.Send( m_serverQueryQueue.data(), toSend * ServerQueryPacketSize );
|
||||
@ -3492,7 +3492,7 @@ void Worker::DispatchFailure( const QueueItem& ev, const char*& ptr )
|
||||
void Worker::Query( ServerQuery type, uint64_t data, uint32_t extra )
|
||||
{
|
||||
ServerQueryPacket query { type, data, extra };
|
||||
if( m_serverQueryQueue.empty() && m_serverQuerySpaceLeft > 0 )
|
||||
if( m_serverQuerySpaceLeft > 0 && m_serverQueryQueue.empty() )
|
||||
{
|
||||
m_serverQuerySpaceLeft--;
|
||||
m_sock.Send( &query, ServerQueryPacketSize );
|
||||
|
Loading…
Reference in New Issue
Block a user