diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-01-16 06:15:48 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-01-16 06:15:48 +0000 |
commit | c599198d83f3572592ff8657948c8c4b272e8e79 (patch) | |
tree | 75e19fae0da56c22d3bc9ad87618e91f9853f75c /src/http/ngx_http_request.c | |
parent | b10b0ee130d6a58ce26aadca2db473d512a1393e (diff) | |
download | nginx-c599198d83f3572592ff8657948c8c4b272e8e79.tar.gz nginx-c599198d83f3572592ff8657948c8c4b272e8e79.zip |
nginx-0.0.1-2004-01-16-09:15:48 import
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r-- | src/http/ngx_http_request.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index a6fb08acb..f685bf348 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -921,18 +921,21 @@ void ngx_http_finalize_request(ngx_http_request_t *r, int rc) clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); - if (r->keepalive != 0 && clcf->keepalive_timeout > 0) { + if (!ngx_terminate + && !ngx_quit + && r->keepalive != 0 + && clcf->keepalive_timeout > 0) + { ngx_http_set_keepalive(r); + return; } else if (r->lingering_close && clcf->lingering_timeout > 0) { ngx_http_set_lingering_close(r); - - } else { - ngx_http_close_request(r, 0); - ngx_http_close_connection(r->connection); + return; } - return; + ngx_http_close_request(r, 0); + ngx_http_close_connection(r->connection); } |