From c599198d83f3572592ff8657948c8c4b272e8e79 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Fri, 16 Jan 2004 06:15:48 +0000 Subject: nginx-0.0.1-2004-01-16-09:15:48 import --- src/http/ngx_http_request.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/http/ngx_http_request.c') 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); } -- cgit v1.2.3