]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG: polling: don't skip polled events in the spec list
authorWilly Tarreau <w@1wt.eu>
Mon, 12 Nov 2012 00:57:14 +0000 (01:57 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 12 Nov 2012 00:57:14 +0000 (01:57 +0100)
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

index ac6ec5f416741dec7c2c8e8ba3dd4af375ad34cd..5df0b45dfdc7b05b7383338a25556cf445e00e2e 100644 (file)
--- 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)