Mercurial > hg > nginx
comparison src/http/ngx_http_request.c @ 1135:03f1133f24e8
close keep-alive connections in the shuting down processes
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 19 Mar 2007 13:20:15 +0000 |
parents | f07a5f4017d9 |
children | b1ebd03de948 |
comparison
equal
deleted
inserted
replaced
1134:384c92c210f9 | 1135:03f1133f24e8 |
---|---|
2030 #if 0 | 2030 #if 0 |
2031 /* if ngx_http_request_t was freed then we need some other place */ | 2031 /* if ngx_http_request_t was freed then we need some other place */ |
2032 r->http_state = NGX_HTTP_KEEPALIVE_STATE; | 2032 r->http_state = NGX_HTTP_KEEPALIVE_STATE; |
2033 #endif | 2033 #endif |
2034 | 2034 |
2035 c->idle = 1; | |
2036 | |
2035 if (rev->ready) { | 2037 if (rev->ready) { |
2036 ngx_http_keepalive_handler(rev); | 2038 ngx_http_keepalive_handler(rev); |
2037 } | 2039 } |
2038 } | 2040 } |
2039 | 2041 |
2048 | 2050 |
2049 c = rev->data; | 2051 c = rev->data; |
2050 | 2052 |
2051 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http keepalive handler"); | 2053 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http keepalive handler"); |
2052 | 2054 |
2053 if (rev->timedout) { | 2055 if (rev->timedout || c->close) { |
2054 ngx_http_close_connection(c); | 2056 ngx_http_close_connection(c); |
2055 return; | 2057 return; |
2056 } | 2058 } |
2057 | 2059 |
2058 #if (NGX_HAVE_KQUEUE) | 2060 #if (NGX_HAVE_KQUEUE) |
2137 #endif | 2139 #endif |
2138 | 2140 |
2139 c->log->handler = ngx_http_log_error; | 2141 c->log->handler = ngx_http_log_error; |
2140 c->log->action = "reading client request line"; | 2142 c->log->action = "reading client request line"; |
2141 | 2143 |
2144 c->idle = 0; | |
2145 | |
2142 ngx_http_init_request(rev); | 2146 ngx_http_init_request(rev); |
2143 } | 2147 } |
2144 | 2148 |
2145 | 2149 |
2146 static void | 2150 static void |