aboutsummaryrefslogtreecommitdiff
path: root/src/http/v3/ngx_http_v3_request.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2021-09-22 14:08:21 +0300
committerRoman Arutyunyan <arut@nginx.com>2021-09-22 14:08:21 +0300
commit08dcf62f5b8ee49927dc38bae705b8fa777799e4 (patch)
treed65779c112bfcc6c777afd16e1cec39d32ad2fe8 /src/http/v3/ngx_http_v3_request.c
parent3ae914c837b2ad4217165007c980d31161d6db9f (diff)
downloadnginx-08dcf62f5b8ee49927dc38bae705b8fa777799e4.tar.gz
nginx-08dcf62f5b8ee49927dc38bae705b8fa777799e4.zip
HTTP/3: fixed ngx_stat_active counter.
Previously the counter was not incremented for HTTP/3 streams, but still decremented in ngx_http_close_connection(). There are two solutions here, one is to increment the counter for HTTP/3 streams, and the other one is not to decrement the counter for HTTP/3 streams. The latter solution looks inconsistent with ngx_stat_reading/ngx_stat_writing, which are incremented on a per-request basis. The change adds ngx_stat_active increment for HTTP/3 request and push streams.
Diffstat (limited to 'src/http/v3/ngx_http_v3_request.c')
-rw-r--r--src/http/v3/ngx_http_v3_request.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c
index 793a34816..533a50fb8 100644
--- a/src/http/v3/ngx_http_v3_request.c
+++ b/src/http/v3/ngx_http_v3_request.c
@@ -78,6 +78,10 @@ ngx_http_v3_init(ngx_connection_t *c)
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http3 init request stream");
+#if (NGX_STAT_STUB)
+ (void) ngx_atomic_fetch_add(ngx_stat_active, 1);
+#endif
+
hc = c->data;
clcf = ngx_http_get_module_loc_conf(hc->conf_ctx, ngx_http_core_module);