Browse Source

[core] use kqueue in level-triggered mode (fixes #2788)

use kqueue in level-triggered mode, not edge-triggered

x-ref:
  "FreeBSD/1.4.45/SSL: requests getting stuck in handle-req state occasionally"
  https://redmine.lighttpd.net/issues/2788
personal/stbuehler/mod-csrf
Glenn Strauss 5 years ago
parent
commit
12440e89cd
  1. 4
      src/fdevent_freebsd_kqueue.c

4
src/fdevent_freebsd_kqueue.c

@ -75,14 +75,14 @@ static int fdevent_freebsd_kqueue_event_set(fdevents *ev, int fde_ndx, int fd, i
if (events == oevents) return fd;
if (addevents & FDEVENT_IN) {
EV_SET(&kev[n], fd, EVFILT_READ, EV_ADD|EV_CLEAR, 0, 0, NULL);
EV_SET(&kev[n], fd, EVFILT_READ, EV_ADD, 0, 0, NULL);
n++;
} else if (delevents & FDEVENT_IN) {
EV_SET(&kev[n], fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
n++;
}
if (addevents & FDEVENT_OUT) {
EV_SET(&kev[n], fd, EVFILT_WRITE, EV_ADD|EV_CLEAR, 0, 0, NULL);
EV_SET(&kev[n], fd, EVFILT_WRITE, EV_ADD, 0, 0, NULL);
n++;
} else if (delevents & FDEVENT_OUT) {
EV_SET(&kev[n], fd, EVFILT_WRITE, EV_DELETE, 0, 0, NULL);

Loading…
Cancel
Save