comparison src/http/ngx_http_request.c @ 3880:e3cb8e27e413

reuse keepalive connections if there are no free worker connections patch by Maxim Dounin
author Igor Sysoev <igor@sysoev.ru>
date Mon, 04 Apr 2011 12:26:53 +0000
parents de59ad6bf557
children 6b608bf9f3ae
comparison
equal deleted inserted replaced
3879:502a6b0acf3f 3880:e3cb8e27e413
2592 /* if ngx_http_request_t was freed then we need some other place */ 2592 /* if ngx_http_request_t was freed then we need some other place */
2593 r->http_state = NGX_HTTP_KEEPALIVE_STATE; 2593 r->http_state = NGX_HTTP_KEEPALIVE_STATE;
2594 #endif 2594 #endif
2595 2595
2596 c->idle = 1; 2596 c->idle = 1;
2597 ngx_reusable_connection(c, 1);
2597 2598
2598 if (rev->ready) { 2599 if (rev->ready) {
2599 ngx_post_event(rev, &ngx_posted_events); 2600 ngx_post_event(rev, &ngx_posted_events);
2600 } 2601 }
2601 } 2602 }
2701 2702
2702 c->log->handler = ngx_http_log_error; 2703 c->log->handler = ngx_http_log_error;
2703 c->log->action = "reading client request line"; 2704 c->log->action = "reading client request line";
2704 2705
2705 c->idle = 0; 2706 c->idle = 0;
2707 ngx_reusable_connection(c, 0);
2706 2708
2707 ngx_http_init_request(rev); 2709 ngx_http_init_request(rev);
2708 } 2710 }
2709 2711
2710 2712