2011-11-16 07:04:25 +00:00
|
|
|
--- nginx-1.0.10/src/event/modules/ngx_epoll_module.c 2011-09-30 22:12:53.000000000 +0800
|
2011-11-30 03:36:09 +00:00
|
|
|
+++ nginx-1.0.10-patched/src/event/modules/ngx_epoll_module.c 2011-11-30 11:08:46.775817019 +0800
|
|
|
|
@@ -682,6 +682,17 @@
|
2011-11-16 07:04:25 +00:00
|
|
|
wev = c->write;
|
|
|
|
|
2011-11-30 03:36:09 +00:00
|
|
|
if ((revents & EPOLLOUT) && wev->active) {
|
|
|
|
+ if (c->fd == -1 || wev->instance != instance) {
|
2011-11-16 07:04:25 +00:00
|
|
|
+
|
2011-11-30 03:36:09 +00:00
|
|
|
+ /*
|
|
|
|
+ * the stale event from a file descriptor
|
|
|
|
+ * that was just closed in this iteration
|
|
|
|
+ */
|
2011-11-16 07:04:25 +00:00
|
|
|
+
|
2011-11-30 03:36:09 +00:00
|
|
|
+ ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
|
|
|
+ "epoll: stale event %p", c);
|
|
|
|
+ continue;
|
|
|
|
+ }
|
2011-11-16 07:04:25 +00:00
|
|
|
|
|
|
|
if (flags & NGX_POST_THREAD_EVENTS) {
|
2011-11-30 03:36:09 +00:00
|
|
|
wev->posted_ready = 1;
|