]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MAJOR: kqueue: Don't reset the changes number by accident.
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 11 Sep 2018 12:44:51 +0000 (14:44 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Sep 2018 12:53:00 +0000 (14:53 +0200)
In _update_fd(), if the fd wasn't polled, and we don't want it to be polled,
we just returned 0, however, we should return changes instead, or all previous
changes will be lost.

This should be backported to 1.8.

src/ev_kqueue.c

index 087a07e7832db2d469e3dad1f4a010cf865af28a..e2f04f7025ad3a5ea44baae4a4188359f9c22bbb 100644 (file)
@@ -44,7 +44,7 @@ static int _update_fd(int fd, int start)
        if (!(fdtab[fd].thread_mask & tid_bit) || !(en & FD_EV_POLLED_RW)) {
                if (!(polled_mask[fd] & tid_bit)) {
                        /* fd was not watched, it's still not */
-                       return 0;
+                       return changes;
                }
                /* fd totally removed from poll list */
                EV_SET(&kev[changes++], fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);