mirror of
https://github.com/nginx/nginx.git
synced 2024-12-12 02:09:04 +08:00
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.
This commit is contained in:
parent
4815b3b2ee
commit
a32d3f8b6b
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -554,7 +554,6 @@ ngx_http_init_request(ngx_event_t *rev)
|
||||
return;
|
||||
}
|
||||
|
||||
c->single_connection = 1;
|
||||
c->destroyed = 0;
|
||||
|
||||
#if (NGX_HTTP_SSL)
|
||||
|
@ -1118,8 +1118,6 @@ ngx_http_upstream_connect(ngx_http_request_t *r, ngx_http_upstream_t *u)
|
||||
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user