comparison src/event/quic/ngx_event_quic.c @ 9160:dd5fd5719027

QUIC: do not call shutdown() when handshake is in progress. Instead, when worker is shutting down and handshake is not yet completed, connection is terminated immediately. Previously the callback could be called while QUIC handshake was in progress and, what's more important, before the init() callback. Now it's postponed after init(). This change is a preparation to postponing HTTP/3 session creation to init().
author Roman Arutyunyan <arut@nginx.com>
date Thu, 21 Sep 2023 19:32:38 +0400
parents ad3d34ddfdcc
children f9845e4b5c14
comparison
equal deleted inserted replaced
9159:6d3ca6f8db35 9160:dd5fd5719027
418 } 418 }
419 419
420 if (c->close) { 420 if (c->close) {
421 c->close = 0; 421 c->close = 0;
422 422
423 if (!ngx_exiting) { 423 if (!ngx_exiting || !qc->streams.initialized) {
424 qc->error = NGX_QUIC_ERR_NO_ERROR; 424 qc->error = NGX_QUIC_ERR_NO_ERROR;
425 qc->error_reason = "graceful shutdown"; 425 qc->error_reason = "graceful shutdown";
426 ngx_quic_close_connection(c, NGX_ERROR); 426 ngx_quic_close_connection(c, NGX_ERROR);
427 return; 427 return;
428 } 428 }