Commit 519553a8 authored by jan.koester's avatar jan.koester
Browse files

test

parent 99d8d7f0
Loading
Loading
Loading
Loading
+5 −7
Changes for src/event/kqueue.cpp: 5 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -122,13 +122,11 @@ namespace netplus {
        
        void flush() {
            if (_count > 0) {
                // Provide an output buffer so kevent() reports per-change
                // errors via EV_ERROR instead of aborting with -1.
                // Without this, one stale change (e.g. EV_DELETE on a
                // closed fd) silently drops every subsequent change in
                // the batch.
                struct kevent errors[MAX_CHANGES];
                kevent(_kqfd, _changes, _count, errors, _count, nullptr);
                // Use nevents=0 so kevent() submits all changes but
                // does NOT return (and consume) any ready events.
                // EV_ONESHOT filters would be silently lost if a ready
                // event were consumed here and then ignored.
                kevent(_kqfd, _changes, _count, nullptr, 0, nullptr);
                _count = 0;
            }
        }