diff src/event/ngx_event_pipe.c @ 162:6be073125f2e NGINX_0_3_28

nginx 0.3.28 *) Feature: the "restrict_host_names" directive was canceled. *) Feature: the --with-cpu-opt=ppc64 configuration parameter. *) Bugfix: on some condition the proxied connection with a client was terminated prematurely. Thanks to Vladimir Shutoff. *) Bugfix: the "X-Accel-Limit-Rate" header line was not taken into account if the request was redirected using the "X-Accel-Redirect" header line. *) Bugfix: the "post_action" directive ran only after a successful completion of a request. *) Bugfix: the proxied response body generated by the "post_action" directive was transferred to a client.
author Igor Sysoev <http://sysoev.ru>
date Thu, 16 Feb 2006 00:00:00 +0300
parents 3656228c0b56
children 2e9c57a5e50a
line wrap: on
line diff
--- a/src/event/ngx_event_pipe.c
+++ b/src/event/ngx_event_pipe.c
@@ -60,8 +60,11 @@ ngx_event_pipe(ngx_event_pipe_t *p, int 
             return NGX_ABORT;
         }
 
-        if (rev->active) {
+        if (rev->active && !rev->ready) {
             ngx_add_timer(rev, p->read_timeout);
+
+        } else if (rev->timer_set) {
+            ngx_del_timer(rev);
         }
     }
 
@@ -71,8 +74,13 @@ ngx_event_pipe(ngx_event_pipe_t *p, int 
             return NGX_ABORT;
         }
 
-        if (wev->active && !wev->ready && !wev->delayed) {
-            ngx_add_timer(wev, p->send_timeout);
+        if (!wev->delayed) {
+            if (wev->active && !wev->ready) {
+                ngx_add_timer(wev, p->send_timeout);
+
+            } else if (wev->timer_set) {
+                ngx_del_timer(wev);
+            }
         }
     }