mirror of
https://github.com/deavmi/birchwood
synced 2024-09-20 14:03:05 +02:00
Receiver
- 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:
parent
9d7682bfdb
commit
e3b2be121b
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user