From c78c41cefcf1e1fa8005f81b7c6cc0c857bcf46f Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 7 Jul 2004 06:15:04 +0000 Subject: nginx-0.0.7-2004-07-07-10:15:04 import --- src/http/ngx_http_request.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 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 e2c28913d..1857f59e9 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -290,6 +290,7 @@ static void ngx_http_init_request(ngx_event_t *rev) return; } + c->single_connection = 1; r->connection = c; r->pipeline = c->pipeline; r->header_in = c->buffer; @@ -1760,9 +1761,11 @@ void ngx_http_close_connection(ngx_connection_t *c) c->read->closed = 1; c->write->closed = 1; - ngx_unlock(&c->lock); - c->read->locked = 0; - c->write->locked = 0; + if (c->single_connection) { + ngx_unlock(&c->lock); + c->read->locked = 0; + c->write->locked = 0; + } ngx_mutex_unlock(ngx_posted_events_mutex); } -- cgit v1.2.3