[PATCH 3 of 3] HTTP/3: insert count block timeout
Roman Arutyunyan
arut at nginx.com
Thu Jan 5 15:31:36 UTC 2023
src/http/v3/ngx_http_v3_request.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
# HG changeset patch
# User Roman Arutyunyan <arut at nginx.com>
# Date 1672931002 -14400
# Thu Jan 05 19:03:22 2023 +0400
# Branch quic
# Node ID a8f6e9a1d1674915501a8322004d04e6eac245d8
# Parent c44c0a06c4c23e599b164a768d6999880411c2e0
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.
diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c
--- a/src/http/v3/ngx_http_v3_request.c
+++ b/src/http/v3/ngx_http_v3_request.c
@@ -558,6 +558,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);
}
More information about the nginx-devel
mailing list