]> git.kaiwu.me - nginx.git/commitdiff
fix socket leak introduced in r2378
authorIgor Sysoev <igor@sysoev.ru>
Mon, 25 May 2009 09:56:01 +0000 (09:56 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 25 May 2009 09:56:01 +0000 (09:56 +0000)
src/http/ngx_http_request.c

index 1761a88ff7439bc9e1d53ec2424334c98a45c569..c9c6db7291f57b3a2faa9ca23f593d7ef682ad7a 100644 (file)
@@ -2098,6 +2098,11 @@ ngx_http_writer(ngx_http_request_t *r)
                    "http writer output filter: %d, \"%V?%V\"",
                    rc, &r->uri, &r->args);
 
+    if (rc == NGX_ERROR) {
+        ngx_http_finalize_request(r, rc);
+        return;
+    }
+
     if (r->buffered || r->postponed || (r == r->main && c->buffered)) {
 
         if (!wev->ready && !wev->delayed) {