fd, event_list[i].events, revents);
}
- if ((revents & (POLLERR|POLLHUP|POLLNVAL))
- && (revents & (POLLIN|POLLOUT)) == 0)
- {
+ if (revents & (POLLERR|POLLHUP|POLLNVAL)) {
+
/*
- * if the error events were returned without POLLIN or POLLOUT,
- * then add these flags to handle the events at least in one
- * active handler
+ * if the error events were returned, add POLLIN and POLLOUT
+ * to handle the events at least in one active handler
*/
revents |= POLLIN|POLLOUT;
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
"epoll_wait() error on fd:%d ev:%04XD",
c->fd, revents);
+
+ /*
+ * if the error events were returned, add EPOLLIN and EPOLLOUT
+ * to handle the events at least in one active handler
+ */
+
+ revents |= EPOLLIN|EPOLLOUT;
}
#if 0
}
#endif
- if ((revents & (EPOLLERR|EPOLLHUP))
- && (revents & (EPOLLIN|EPOLLOUT)) == 0)
- {
- /*
- * if the error events were returned without EPOLLIN or EPOLLOUT,
- * then add these flags to handle the events at least in one
- * active handler
- */
-
- revents |= EPOLLIN|EPOLLOUT;
- }
-
if ((revents & EPOLLIN) && rev->active) {
#if (NGX_HAVE_EPOLLRDHUP)
(int) event_list[i].portev_object, revents);
}
- if ((revents & (POLLERR|POLLHUP|POLLNVAL))
- && (revents & (POLLIN|POLLOUT)) == 0)
- {
+ if (revents & (POLLERR|POLLHUP|POLLNVAL)) {
+
/*
- * if the error events were returned without POLLIN or POLLOUT,
- * then add these flags to handle the events at least in one
- * active handler
+ * if the error events were returned, add POLLIN and POLLOUT
+ * to handle the events at least in one active handler
*/
revents |= POLLIN|POLLOUT;
continue;
}
- if ((revents & (POLLERR|POLLHUP|POLLNVAL))
- && (revents & (POLLIN|POLLOUT)) == 0)
- {
+ if (revents & (POLLERR|POLLHUP|POLLNVAL)) {
+
/*
- * if the error events were returned without POLLIN or POLLOUT,
- * then add these flags to handle the events at least in one
- * active handler
+ * if the error events were returned, add POLLIN and POLLOUT
+ * to handle the events at least in one active handler
*/
revents |= POLLIN|POLLOUT;