aboutsummaryrefslogtreecommitdiff
path: root/src/event/modules/ngx_epoll_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/event/modules/ngx_epoll_module.c')
-rw-r--r--src/event/modules/ngx_epoll_module.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/event/modules/ngx_epoll_module.c b/src/event/modules/ngx_epoll_module.c
index 4f9c5118e..f4003af70 100644
--- a/src/event/modules/ngx_epoll_module.c
+++ b/src/event/modules/ngx_epoll_module.c
@@ -681,19 +681,19 @@ ngx_epoll_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, ngx_uint_t flags)
wev = c->write;
- if (c->fd == -1 || wev->instance != instance) {
+ if ((revents & EPOLLOUT) && wev->active) {
- /*
- * the stale event from a file descriptor
- * that was just closed in this iteration
- */
+ if (c->fd == -1 || wev->instance != instance) {
- ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
- "epoll: stale event %p", c);
- continue;
- }
+ /*
+ * the stale event from a file descriptor
+ * that was just closed in this iteration
+ */
- if ((revents & EPOLLOUT) && wev->active) {
+ ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
+ "epoll: stale event %p", c);
+ continue;
+ }
if (flags & NGX_POST_THREAD_EVENTS) {
wev->posted_ready = 1;