Mercurial > hg > nginx
comparison src/event/quic/ngx_event_quic.c @ 8828:a9f6540e61da quic
QUIC: asynchronous shutdown.
Previously, when cleaning up a QUIC stream in shutdown mode,
ngx_quic_shutdown_quic() was called, which could close the QUIC connection
right away. This could be a problem if the connection was referenced up the
stack. For example, this could happen in ngx_quic_init_streams(),
ngx_quic_close_streams(), ngx_quic_create_client_stream() etc.
With a typical HTTP/3 client the issue is unlikely because of HTTP/3 uni
streams which need a posted event to close. In this case QUIC connection
cannot be closed right away.
Now QUIC connection read event is posted and it will shut down the connection
asynchronously.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Thu, 05 Aug 2021 09:20:32 +0300 |
parents | fe919fd63b0b |
children | cbbe901c199d |
comparison
equal
deleted
inserted
replaced
8827:fe919fd63b0b | 8828:a9f6540e61da |
---|---|
419 } | 419 } |
420 | 420 |
421 if (!rev->ready) { | 421 if (!rev->ready) { |
422 if (qc->closing) { | 422 if (qc->closing) { |
423 ngx_quic_close_connection(c, NGX_OK); | 423 ngx_quic_close_connection(c, NGX_OK); |
424 } | 424 |
425 } else if (qc->shutdown) { | |
426 ngx_quic_shutdown_quic(c); | |
427 } | |
428 | |
425 return; | 429 return; |
426 } | 430 } |
427 | 431 |
428 b = c->udp->dgram->buffer; | 432 b = c->udp->dgram->buffer; |
429 | 433 |