kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit c49622e4ae428d185772e99ac06ae1760d064766
parent 25f1ab9865dbcaffb6a8c303f41275d0dbf626e3
Author: Joris Vink <joris@coders.se>
Date:   Thu, 20 Jun 2013 23:29:26 +0200

do not schedule kqueue events if we've reached the limit of changelist.

Diffstat:
src/bsd.c | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/bsd.c b/src/bsd.c @@ -195,8 +195,13 @@ kore_event_wait(int quit) void kore_event_schedule(int fd, int type, int flags, void *data) { - EV_SET(&changelist[nchanges], fd, type, flags, 0, 0, data); - nchanges++; + if (nchanges >= KQUEUE_EVENTS) { + kore_log(LOG_WARNING, "cannot schedule %d (%d) on %d", + type, flags, fd); + } else { + EV_SET(&changelist[nchanges], fd, type, flags, 0, 0, data); + nchanges++; + } } void