Always preserve order of queries.

This commit is contained in:
Bartosz Taudul 2020-04-30 02:25:25 +02:00
parent 8fa0a4dc9e
commit 035bb2236d

View File

@ -3204,7 +3204,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_serverQuerySpaceLeft > 0 )
if( m_serverQueryQueue.empty() && m_serverQuerySpaceLeft > 0 )
{
m_serverQuerySpaceLeft--;
m_sock.Send( &query, ServerQueryPacketSize );