From 70d0ad560c026617d1f60d666f7264022e364cc0 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 12 Nov 2012 01:57:14 +0100 Subject: [PATCH] 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. --- src/fd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fd.c b/src/fd.c index ac6ec5f41..5df0b45df 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)