aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2020-07-22 11:03:42 +0300
committerRoman Arutyunyan <arut@nginx.com>2020-07-22 11:03:42 +0300
commitcdc0d61ea0c55f89c9fbc35b4c785c1f5d7f895e (patch)
tree358870b6bf17e8d0a1aed0e04746d4613ef43c87 /src
parent3073ad1381c4d8f8aae4501d66497164167b2081 (diff)
downloadnginx-cdc0d61ea0c55f89c9fbc35b4c785c1f5d7f895e.tar.gz
nginx-cdc0d61ea0c55f89c9fbc35b4c785c1f5d7f895e.zip
HTTP/3: do not call shutdown() for QUIC streams.
Previously, this triggered an alert "shutdown() failed" in error log.
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_request.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 9b6d461e0..285879f2f 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -3504,11 +3504,13 @@ ngx_http_set_lingering_close(ngx_http_request_t *r)
}
}
- 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 (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 (rev->ready) {