summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/tevent/tevent_epoll.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/tevent/tevent_epoll.c b/lib/tevent/tevent_epoll.c
index 41415b06e9..19f6809f27 100644
--- a/lib/tevent/tevent_epoll.c
+++ b/lib/tevent/tevent_epoll.c
@@ -702,6 +702,16 @@ static int epoll_event_loop(struct epoll_event_context *epoll_ev, struct timeval
if (events[i].events & EPOLLIN) flags |= TEVENT_FD_READ;
if (events[i].events & EPOLLOUT) flags |= TEVENT_FD_WRITE;
+ if (flags & TEVENT_FD_WRITE) {
+ if (fde->flags & TEVENT_FD_WRITE) {
+ mpx_fde = NULL;
+ }
+ if (mpx_fde && mpx_fde->flags & TEVENT_FD_WRITE) {
+ fde = mpx_fde;
+ mpx_fde = NULL;
+ }
+ }
+
if (mpx_fde) {
/* Ensure we got the right fde. */
if ((flags & fde->flags) == 0) {