summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/events/events.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/lib/events/events.c b/source4/lib/events/events.c
index 3a15172d95..23026166a2 100644
--- a/source4/lib/events/events.c
+++ b/source4/lib/events/events.c
@@ -262,7 +262,10 @@ void event_fd_setflags(struct fd_event *fde, uint16_t flags)
{
#if WITH_EPOLL
struct event_context *ev;
- if (fde == NULL) return;
+ if (fde == NULL ||
+ fde->flags == flags) {
+ return;
+ }
ev = fde->event_ctx;
if (ev->epoll_fd != -1) {
struct epoll_event event;