]> git.kaiwu.me - nginx.git/commitdiff
HTTP/3: graceful shutdown on keepalive timeout expiration.
authorRoman Arutyunyan <arut@nginx.com>
Tue, 7 Jan 2025 17:14:58 +0000 (21:14 +0400)
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>
Tue, 15 Apr 2025 15:01:36 +0000 (19:01 +0400)
Previously, the expiration caused QUIC connection finalization even if
there are application-terminated streams finishing sending data.  Such
finalization terminated these streams.

An easy way to trigger this is to request a large file from HTTP/3 over
a small MTU.  In this case keepalive timeout expiration may abruptly
terminate the request stream.

src/http/v3/ngx_http_v3.c

index 8db229b29aa9923b8a737ba4102df479490d0c2e..d8597ec5c71435f3b22fb5c33bf90bb04e3c1985 100644 (file)
@@ -70,7 +70,7 @@ ngx_http_v3_keepalive_handler(ngx_event_t *ev)
 
     ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http3 keepalive handler");
 
-    ngx_http_v3_finalize_connection(c, NGX_HTTP_V3_ERR_NO_ERROR,
+    ngx_http_v3_shutdown_connection(c, NGX_HTTP_V3_ERR_NO_ERROR,
                                     "keepalive timeout");
 }