summaryrefslogtreecommitdiff
path: root/lib/tevent
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tevent')
-rw-r--r--lib/tevent/tevent_poll.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/tevent/tevent_poll.c b/lib/tevent/tevent_poll.c
index 867d951ee1..aa4c50c0c5 100644
--- a/lib/tevent/tevent_poll.c
+++ b/lib/tevent/tevent_poll.c
@@ -594,6 +594,12 @@ static int poll_event_loop_poll(struct tevent_context *ev,
if (pfd->revents & POLLOUT) {
flags |= TEVENT_FD_WRITE;
}
+ /*
+ * Note that fde->flags could be changed when using
+ * the poll_mt backend together with threads,
+ * that why we need to check pfd->revents and fde->flags
+ */
+ flags &= fde->flags;
if (flags != 0) {
fde->handler(ev, fde, flags, fde->private_data);
return 0;