1
0
mirror of https://github.com/deavmi/birchwood synced 2024-09-20 14:43:23 +02:00
- Instead of locking, processing a potential pong and ONE normal message and then unlocking, now we process all messages we have
This commit is contained in:
Tristan B. Velloza Kildaire 2023-03-10 17:26:06 +02:00
parent 9d7682bfdb
commit e3b2be121b

View File

@ -110,10 +110,6 @@ public final class ReceiverThread : Thread
break;
}
pos++;
}
@ -164,8 +160,11 @@ public final class ReceiverThread : Thread
client.engine.push(pongEvent);
}
/* Now let's go message by message */
if(!recvQueue.empty())
/**
* Process each message remaining in the queue now
* till it is empty
*/
while(!recvQueue.empty())
{
ubyte[] message = recvQueue.front();
@ -188,6 +187,7 @@ public final class ReceiverThread : Thread
/* Unlock the receive queue */
recvQueueLock.unlock();