diff options
author | Igor Sysoev <igor@sysoev.ru> | 2011-04-04 12:26:53 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2011-04-04 12:26:53 +0000 |
commit | 4956ac510858c5bc32945bcb87a460b91440ad3e (patch) | |
tree | c3692ef67e1a4fb4d10a4ab213c13844a34173ed /src/http/ngx_http_request.c | |
parent | fde7d51392598d0fa74dca125883d9663e7eb80a (diff) | |
download | nginx-4956ac510858c5bc32945bcb87a460b91440ad3e.tar.gz nginx-4956ac510858c5bc32945bcb87a460b91440ad3e.zip |
reuse keepalive connections if there are no free worker connections
patch by Maxim Dounin
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r-- | src/http/ngx_http_request.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index bd51e061f..2cef4fa5b 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -2594,6 +2594,7 @@ ngx_http_set_keepalive(ngx_http_request_t *r) #endif c->idle = 1; + ngx_reusable_connection(c, 1); if (rev->ready) { ngx_post_event(rev, &ngx_posted_events); @@ -2703,6 +2704,7 @@ ngx_http_keepalive_handler(ngx_event_t *rev) c->log->action = "reading client request line"; c->idle = 0; + ngx_reusable_connection(c, 0); ngx_http_init_request(rev); } |