From a32d3f8b6b63672fd96ca5ffb82e3e2ee0719850 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Thu, 7 Mar 2013 18:07:16 +0000 Subject: Removed c->single_connection flag. The c->single_connection was intended to be used as lock mechanism to serialize modifications of request object from several threads working with client and upstream connections. The flag is redundant since threads in nginx have never been used that way. --- src/core/ngx_connection.c | 8 +++----- src/core/ngx_connection.h | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'src/core') diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c index c818114df..09ad15fcc 100644 --- a/src/core/ngx_connection.c +++ b/src/core/ngx_connection.c @@ -900,11 +900,9 @@ ngx_close_connection(ngx_connection_t *c) c->read->closed = 1; c->write->closed = 1; - if (c->single_connection) { - ngx_unlock(&c->lock); - c->read->locked = 0; - c->write->locked = 0; - } + ngx_unlock(&c->lock); + c->read->locked = 0; + c->write->locked = 0; ngx_mutex_unlock(ngx_posted_events_mutex); diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h index 87fd08723..3daf2eee4 100644 --- a/src/core/ngx_connection.h +++ b/src/core/ngx_connection.h @@ -152,7 +152,6 @@ struct ngx_connection_s { unsigned log_error:3; /* ngx_connection_log_error_e */ - unsigned single_connection:1; unsigned unexpected_eof:1; unsigned timedout:1; unsigned error:1; -- cgit