While handling an fd event, the situation with other fds can change. I've just
seen a winbind stuck in the accept() call on the privileged pipe. I can only
imagine this happen because under high load we first handled other requests and
meanwhile the client on the privileged pipe went away.
message_dispatch(winbind_messaging_context());
- run_events(winbind_event_context(), 0, NULL, NULL);
+ if (run_events(winbind_event_context(), 0, NULL, NULL)) {
+ return;
+ }
/* refresh the trusted domain cache */
flags |= EVENT_FD_READ;
if (FD_ISSET(ev->fd, &w_fds))
flags |= EVENT_FD_WRITE;
- if (flags)
+ if (flags) {
ev->handler(ev, flags);
+ return;
+ }
ev = next;
}