]> git.kaiwu.me - nginx.git/commit
QUIC: reset qc->error to zero again.
authorSergey Kandaurov <pluknet@nginx.com>
Wed, 14 May 2025 19:33:00 +0000 (23:33 +0400)
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>
Fri, 23 May 2025 11:00:47 +0000 (15:00 +0400)
commit5d7fd4a7e3025e8600bb029742a0a28bf4ca9eec
tree52d172c1e0574b86b66a55263f49220bc287d7d6
parent7468a10b62276be4adee0fcd6aaf6244270984ab
QUIC: reset qc->error to zero again.

Following the previous change that removed posting a close event
in OpenSSL compat layer, now ngx_quic_close_connection() is always
called on error path with either NGX_ERROR or qc->error set.

This allows to remove a special value -1 served as a missing error,
which simplifies the code.  Partially reverts d3fb12d77.

Also, this improves handling of the draining connection state, which
consists of posting a close event with NGX_OK and no qc->error set,
where it was previously converted to NGX_QUIC_ERR_INTERNAL_ERROR.
Notably, this is rather a cosmetic fix, because drained connections
do not send any packets including CONNECTION_CLOSE, and qc->error
is not otherwise used.
src/event/quic/ngx_event_quic.c
src/event/quic/ngx_event_quic_ssl.c