Mercurial > hg > nginx
diff src/http/ngx_http_request.c @ 380:5ce6561246a5
nginx-0.0.7-2004-07-07-10:15:04 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 07 Jul 2004 06:15:04 +0000 |
parents | 41437e4fd9b4 |
children | c05876036128 |
line wrap: on
line diff
--- 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_ev 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_conne 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); }