]> git.kaiwu.me - nginx.git/commitdiff
Removed dead code from ngx_http_set_keepalive().
authorRuslan Ermilov <ru@nginx.com>
Fri, 6 Nov 2020 20:44:47 +0000 (23:44 +0300)
committerRuslan Ermilov <ru@nginx.com>
Fri, 6 Nov 2020 20:44:47 +0000 (23:44 +0300)
The code removed became dead after 98f03cd8d6cc (0.8.14),
circa when the request reference counting was introduced.

src/http/ngx_http_request.c

index 204a9399de3b790038797a5be52d6e3eb1caa91b..5ee9dee140948daec7f12c6d446469d114593b20 100644 (file)
@@ -3039,13 +3039,6 @@ ngx_http_set_keepalive(ngx_http_request_t *r)
 
     ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "set http keepalive handler");
 
-    if (r->discard_body) {
-        r->write_event_handler = ngx_http_request_empty_handler;
-        r->lingering_time = ngx_time() + (time_t) (clcf->lingering_time / 1000);
-        ngx_add_timer(rev, clcf->lingering_timeout);
-        return;
-    }
-
     c->log->action = "closing request";
 
     hc = r->http_connection;