From 52d0bf620a964bbb51bd7ff87e778ba72164b802 Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Mon, 21 Dec 2020 17:35:13 +0000 Subject: [PATCH] HTTP/3: removed HTTP/3-specific code. The ngx_http_set_lingering_close() function is not called for HTTP/3. The change reduces diff to the default branch. --- src/http/ngx_http_request.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index abcc1bba8..b747b0206 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -3451,13 +3451,11 @@ ngx_http_set_lingering_close(ngx_connection_t *c) } } - if (c->fd != NGX_INVALID_FILE) { - if (ngx_shutdown_socket(c->fd, NGX_WRITE_SHUTDOWN) == -1) { - ngx_connection_error(c, ngx_socket_errno, - ngx_shutdown_socket_n " failed"); - ngx_http_close_request(r, 0); - return; - } + if (ngx_shutdown_socket(c->fd, NGX_WRITE_SHUTDOWN) == -1) { + ngx_connection_error(c, ngx_socket_errno, + ngx_shutdown_socket_n " failed"); + ngx_http_close_request(r, 0); + return; } ngx_add_timer(rev, clcf->lingering_timeout);