From: Willy Tarreau Date: Mon, 12 Nov 2012 00:57:14 +0000 (+0100) Subject: BUG: polling: don't skip polled events in the spec list X-Git-Tag: v1.5-dev13~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70d0ad560c026617d1f60d666f7264022e364cc0;p=thirdparty%2Fhaproxy.git BUG: polling: don't skip polled events in the spec list Commit 09f245 came with a bug : if we don't process events from the spec list that are also being polled, we can end up with some stuck events that nobody processes. We must process all events from the spec list even if they're being polled in parallel. --- diff --git a/src/fd.c b/src/fd.c index ac6ec5f416..5df0b45dfd 100644 --- a/src/fd.c +++ b/src/fd.c @@ -156,10 +156,10 @@ void fd_process_spec_events() fdtab[fd].ev &= FD_POLL_STICKY; - if ((e & FD_EV_STATUS_R) == FD_EV_ACTIVE_R) + if (e & FD_EV_ACTIVE_R) fdtab[fd].ev |= FD_POLL_IN; - if ((e & FD_EV_STATUS_W) == FD_EV_ACTIVE_W) + if (e & FD_EV_ACTIVE_W) fdtab[fd].ev |= FD_POLL_OUT; if (fdtab[fd].iocb && fdtab[fd].owner && fdtab[fd].ev)