From 7b224e33b53a98a3db72467633596bbdad40ac3a Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Fri, 11 Apr 2008 11:08:37 +0200 Subject: [PATCH] kqueue: also use EV_ONESHOT for read events This makes the kernel's state agree with our handler pointer. SSL may need to suspend selecting for reading to write something, e.g. with renegotiation. libratbox r25223 --- libratbox/src/kqueue.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libratbox/src/kqueue.c b/libratbox/src/kqueue.c index faeacd3d..72763c0e 100644 --- a/libratbox/src/kqueue.c +++ b/libratbox/src/kqueue.c @@ -97,10 +97,7 @@ kq_update_events(rb_fde_t * F, short filter, PF * handler) if(handler != NULL) { - if(filter == EVFILT_WRITE) - kep_flags = (EV_ADD | EV_ONESHOT); - else - kep_flags = EV_ADD; + kep_flags = EV_ADD | EV_ONESHOT; } else {