1
0
mirror of https://github.com/deavmi/birchwood synced 2024-09-20 14:03:05 +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; break;
} }
pos++; pos++;
} }
@ -164,8 +160,11 @@ public final class ReceiverThread : Thread
client.engine.push(pongEvent); 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(); ubyte[] message = recvQueue.front();
@ -185,6 +184,7 @@ public final class ReceiverThread : Thread
EventyEvent ircEvent = new IRCEvent(curMsg); EventyEvent ircEvent = new IRCEvent(curMsg);
client.engine.push(ircEvent); client.engine.push(ircEvent);
} }