Skip to content

Commit

Permalink
Fixed possible request hang with filter finalization.
Browse files Browse the repository at this point in the history
With r->filter_finalize set the ngx_http_finalize_connection() wasn't
called from ngx_http_finalize_request() called with NGX_OK, resulting in
r->main->count not being decremented, thus causing request hang in some
rare situations.

See here for more details:
http://mailman.nginx.org/pipermail/nginx-devel/2012-May/002190.html

Patch by Yichun Zhang (agentzh).


git-svn-id: svn://svn.nginx.org/nginx/trunk@4621 73f98a42-aea0-e011-b76d-00259023448c
  • Loading branch information
mdounin committed May 14, 2012
1 parent 3b6c017 commit 35b553d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/http/ngx_http_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -1933,6 +1933,7 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)

if (rc == NGX_OK && r->filter_finalize) {
c->error = 1;
ngx_http_finalize_connection(r);
return;
}

Expand Down

0 comments on commit 35b553d

Please sign in to comment.