Compare commits

..

4 Commits

3 changed files with 16 additions and 17 deletions

View File

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

View File

@ -107,7 +107,7 @@ mv chaoslawful-drizzle-nginx-module-* drizzle-nginx-module-$ver || exit 1
################################# #################################
ver=0.3.1rc34 ver=0.3.1rc37
$root/util/get-tarball "http://github.com/chaoslawful/lua-nginx-module/tarball/v$ver" -O lua-nginx-module-$ver.tar.gz || exit 1 $root/util/get-tarball "http://github.com/chaoslawful/lua-nginx-module/tarball/v$ver" -O lua-nginx-module-$ver.tar.gz || exit 1
tar -xzf lua-nginx-module-$ver.tar.gz || exit 1 tar -xzf lua-nginx-module-$ver.tar.gz || exit 1
mv chaoslawful-lua-nginx-module-* ngx_lua-$ver || exit 1 mv chaoslawful-lua-nginx-module-* ngx_lua-$ver || exit 1

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
main_ver=1.0.10 main_ver=1.0.10
minor_ver=13 minor_ver=21
version=$main_ver.$minor_ver version=$main_ver.$minor_ver
echo $version echo $version