From 157da97d7ad4bf6eae165b46d26f7756f4f8381d Mon Sep 17 00:00:00 2001 From: Sergey Kandaurov Date: Tue, 23 Jun 2020 11:57:00 +0300 Subject: Reject new QUIC connection with CONNECTION_REFUSED on shutdown. --- src/event/ngx_event_quic.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c index 95711bdfc..1a2fdf2d5 100644 --- a/src/event/ngx_event_quic.c +++ b/src/event/ngx_event_quic.c @@ -712,6 +712,11 @@ ngx_quic_new_connection(ngx_connection_t *c, ngx_ssl_t *ssl, ngx_quic_tp_t *tp, qc->initialized = 1; + if (ngx_terminate || ngx_exiting) { + qc->error = NGX_QUIC_ERR_CONNECTION_REFUSED; + return NGX_ERROR; + } + if (pkt->token.len) { rc = ngx_quic_validate_token(c, pkt); -- cgit