mirror of
https://github.com/nginx/nginx.git
synced 2024-11-23 20:19:02 +08:00
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().
This commit is contained in:
parent
ec37134416
commit
6ecf576e34
@ -420,7 +420,7 @@ ngx_quic_input_handler(ngx_event_t *rev)
|
||||
if (c->close) {
|
||||
c->close = 0;
|
||||
|
||||
if (!ngx_exiting) {
|
||||
if (!ngx_exiting || !qc->streams.initialized) {
|
||||
qc->error = NGX_QUIC_ERR_NO_ERROR;
|
||||
qc->error_reason = "graceful shutdown";
|
||||
ngx_quic_close_connection(c, NGX_ERROR);
|
||||
|
Loading…
Reference in New Issue
Block a user