changeset 9067:6bb884dc7291 quic

HTTP/3: insert count block timeout. Previously, there was no timeout for a request stream blocked on insert count, which could result in infinite wait. Now client_header_timeout is set when stream is first blocked.
author Roman Arutyunyan <arut@nginx.com>
date Thu, 05 Jan 2023 19:03:22 +0400
parents eaa8dc3788e1
children bf2267887014
files src/http/v3/ngx_http_v3_request.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/v3/ngx_http_v3_request.c
+++ b/src/http/v3/ngx_http_v3_request.c
@@ -555,6 +555,12 @@ ngx_http_v3_process_request(ngx_event_t 
                 break;
             }
 
+            if (!rev->timer_set) {
+                cscf = ngx_http_get_module_srv_conf(r,
+                                                    ngx_http_core_module);
+                ngx_add_timer(rev, cscf->client_header_timeout);
+            }
+
             if (ngx_handle_read_event(rev, 0) != NGX_OK) {
                 ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
             }