summaryrefslogtreecommitdiffhomepage
path: root/src/http/v3/ngx_http_v3.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/v3/ngx_http_v3.c')
-rw-r--r--src/http/v3/ngx_http_v3.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/http/v3/ngx_http_v3.c b/src/http/v3/ngx_http_v3.c
index 500113509..97d8a5e34 100644
--- a/src/http/v3/ngx_http_v3.c
+++ b/src/http/v3/ngx_http_v3.c
@@ -33,7 +33,7 @@ ngx_http_v3_init_session(ngx_connection_t *c)
h3c = ngx_pcalloc(pc->pool, sizeof(ngx_http_v3_session_t));
if (h3c == NULL) {
- return NGX_ERROR;
+ goto failed;
}
h3c->max_push_id = (uint64_t) -1;
@@ -49,7 +49,7 @@ ngx_http_v3_init_session(ngx_connection_t *c)
cln = ngx_pool_cleanup_add(pc->pool, 0);
if (cln == NULL) {
- return NGX_ERROR;
+ goto failed;
}
cln->handler = ngx_http_v3_cleanup_session;
@@ -58,6 +58,14 @@ ngx_http_v3_init_session(ngx_connection_t *c)
hc->v3_session = h3c;
return ngx_http_v3_send_settings(c);
+
+failed:
+
+ ngx_log_error(NGX_LOG_ERR, c->log, 0, "failed to create http3 session");
+
+ ngx_http_v3_finalize_connection(c, NGX_HTTP_V3_ERR_INTERNAL_ERROR,
+ "failed to create http3 session");
+ return NGX_ERROR;
}