diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-07-07 06:15:04 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-07-07 06:15:04 +0000 |
commit | c78c41cefcf1e1fa8005f81b7c6cc0c857bcf46f (patch) | |
tree | 167a534227a7b4203892a0bb1a493a7fd4af6279 /src/http/ngx_http_request.c | |
parent | 81a432a185bc61d46a4d5eb1f96773ee7b3dc6a3 (diff) | |
download | nginx-c78c41cefcf1e1fa8005f81b7c6cc0c857bcf46f.tar.gz nginx-c78c41cefcf1e1fa8005f81b7c6cc0c857bcf46f.zip |
nginx-0.0.7-2004-07-07-10:15:04 import
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r-- | src/http/ngx_http_request.c | 9 |
1 files changed, 6 insertions, 3 deletions
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); } |