forked from mirrors/kore
do not schedule kqueue events if we've reached the limit of changelist.
This commit is contained in:
parent
25f1ab9865
commit
c49622e4ae
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue