[nginx] svn commit: r5105 - in trunk/src: core http
vbart at nginx.com
vbart at nginx.com
Thu Mar 7 18:07:16 UTC 2013
Author: vbart
Date: 2013-03-07 18:07:16 +0000 (Thu, 07 Mar 2013)
New Revision: 5105
URL: http://trac.nginx.org/nginx/changeset/5105/nginx
Log:
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.
Modified:
trunk/src/core/ngx_connection.c
trunk/src/core/ngx_connection.h
trunk/src/http/ngx_http_request.c
trunk/src/http/ngx_http_upstream.c
Modified: trunk/src/core/ngx_connection.c
===================================================================
--- trunk/src/core/ngx_connection.c 2013-03-07 17:59:27 UTC (rev 5104)
+++ trunk/src/core/ngx_connection.c 2013-03-07 18:07:16 UTC (rev 5105)
@@ -900,11 +900,9 @@
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);
Modified: trunk/src/core/ngx_connection.h
===================================================================
--- trunk/src/core/ngx_connection.h 2013-03-07 17:59:27 UTC (rev 5104)
+++ trunk/src/core/ngx_connection.h 2013-03-07 18:07:16 UTC (rev 5105)
@@ -152,7 +152,6 @@
unsigned log_error:3; /* ngx_connection_log_error_e */
- unsigned single_connection:1;
unsigned unexpected_eof:1;
unsigned timedout:1;
unsigned error:1;
Modified: trunk/src/http/ngx_http_request.c
===================================================================
--- trunk/src/http/ngx_http_request.c 2013-03-07 17:59:27 UTC (rev 5104)
+++ trunk/src/http/ngx_http_request.c 2013-03-07 18:07:16 UTC (rev 5105)
@@ -554,7 +554,6 @@
return;
}
- c->single_connection = 1;
c->destroyed = 0;
#if (NGX_HTTP_SSL)
Modified: trunk/src/http/ngx_http_upstream.c
===================================================================
--- trunk/src/http/ngx_http_upstream.c 2013-03-07 17:59:27 UTC (rev 5104)
+++ trunk/src/http/ngx_http_upstream.c 2013-03-07 18:07:16 UTC (rev 5105)
@@ -1118,8 +1118,6 @@
r->connection->log->action = "connecting to upstream";
- r->connection->single_connection = 0;
-
if (u->state && u->state->response_sec) {
tp = ngx_timeofday();
u->state->response_sec = tp->sec - u->state->response_sec;
More information about the nginx-devel
mailing list