summaryrefslogtreecommitdiffhomepage
path: root/src/http/v3
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/v3')
-rw-r--r--src/http/v3/ngx_http_v3.h3
-rw-r--r--src/http/v3/ngx_http_v3_request.c3
-rw-r--r--src/http/v3/ngx_http_v3_streams.c4
3 files changed, 10 insertions, 0 deletions
diff --git a/src/http/v3/ngx_http_v3.h b/src/http/v3/ngx_http_v3.h
index a8a5c5cd4..be0ed127d 100644
--- a/src/http/v3/ngx_http_v3.h
+++ b/src/http/v3/ngx_http_v3.h
@@ -82,6 +82,9 @@
#define ngx_http_v3_finalize_connection(c, code, reason) \
ngx_quic_finalize_connection(c->quic->parent, code, reason)
+#define ngx_http_v3_shutdown_connection(c, code, reason) \
+ ngx_quic_shutdown_connection(c->quic->parent, code, reason)
+
typedef struct {
ngx_quic_tp_t quic;
diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c
index 0c055ba0e..d4a5faccf 100644
--- a/src/http/v3/ngx_http_v3_request.c
+++ b/src/http/v3/ngx_http_v3_request.c
@@ -93,6 +93,9 @@ ngx_http_v3_init(ngx_connection_t *c)
ngx_http_close_connection(c);
return;
}
+
+ ngx_http_v3_shutdown_connection(c, NGX_HTTP_V3_ERR_NO_ERROR,
+ "reached maximum number of requests");
}
cscf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_core_module);
diff --git a/src/http/v3/ngx_http_v3_streams.c b/src/http/v3/ngx_http_v3_streams.c
index e09556c93..eac49a659 100644
--- a/src/http/v3/ngx_http_v3_streams.c
+++ b/src/http/v3/ngx_http_v3_streams.c
@@ -80,6 +80,8 @@ ngx_http_v3_init_uni_stream(ngx_connection_t *c)
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http3 init uni stream");
+ c->quic->cancelable = 1;
+
us = ngx_pcalloc(c->pool, sizeof(ngx_http_v3_uni_stream_t));
if (us == NULL) {
ngx_http_close_connection(c);
@@ -436,6 +438,8 @@ ngx_http_v3_get_uni_stream(ngx_connection_t *c, ngx_uint_t type)
return NULL;
}
+ sc->quic->cancelable = 1;
+
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
"http3 create uni stream, type:%ui", type);