From 50dd9ba7e85a8d4eeecaad8776f83adc607fd132 Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Thu, 11 Nov 2021 19:07:00 +0300 Subject: QUIC: reject streams which we could not create. The reasons why a stream may not be created by server currently include hitting worker_connections limit and memory allocation error. Previously in these cases the entire QUIC connection was closed and all its streams were shut down. Now the new stream is rejected and existing streams continue working. To reject an HTTP/3 request stream, RESET_STREAM and STOP_SENDING with H3_REQUEST_REJECTED error code are sent to client. HTTP/3 uni streams and Stream streams are not rejected. --- src/stream/ngx_stream_quic_module.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/stream/ngx_stream_quic_module.c') diff --git a/src/stream/ngx_stream_quic_module.c b/src/stream/ngx_stream_quic_module.c index b40b17c93..7ad96a11c 100644 --- a/src/stream/ngx_stream_quic_module.c +++ b/src/stream/ngx_stream_quic_module.c @@ -241,6 +241,9 @@ ngx_stream_quic_create_srv_conf(ngx_conf_t *cf) * conf->tp.retry_scid = { 0, NULL }; * conf->tp.preferred_address = NULL * conf->host_key = { 0, NULL } + * conf->stream_close_code = 0; + * conf->stream_reject_code_uni = 0; + * conf->stream_reject_code_bidi= 0; */ conf->tp.max_idle_timeout = NGX_CONF_UNSET_MSEC; -- cgit