Skip to content

Commit 48557a9

Browse files
jblacheMadCoder
authored andcommitted
Actually update epoll events if needed when unregistering
_dispatch_epoll_update() was being called without dmn->dmn_events being updated beforehand. Signed-off-by: Pierre Habouzit <phabouzit@apple.com>
1 parent 993be7a commit 48557a9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/event/event_epoll.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ _dispatch_unote_unregister(dispatch_unote_t du, uint32_t flags)
316316
if (events == dmn->dmn_events) {
317317
// nothing to do
318318
} else if (events & (EPOLLIN | EPOLLOUT)) {
319+
dmn->dmn_events = events;
319320
_dispatch_epoll_update(dmn, EPOLL_CTL_MOD);
320321
} else {
321322
epoll_ctl(_dispatch_epfd, EPOLL_CTL_DEL, dmn->dmn_fd, NULL);

0 commit comments

Comments
 (0)