diff options
| author | Roman Arutyunyan <arut@nginx.com> | 2023-09-13 17:59:37 +0400 |
|---|---|---|
| committer | Roman Arutyunyan <arut@nginx.com> | 2023-09-13 17:59:37 +0400 |
| commit | 33dca887925d9cec7153252dcd5380c394090936 (patch) | |
| tree | 930802835f14c05c74f563975011721411c11dfb /src/event/quic/ngx_event_quic.c | |
| parent | b489ba83e9be446923facfe1a2fe392be3095d1f (diff) | |
| download | nginx-33dca887925d9cec7153252dcd5380c394090936.tar.gz nginx-33dca887925d9cec7153252dcd5380c394090936.tar.bz2 | |
QUIC: "handshake_timeout" configuration parameter.
Previously QUIC did not have such parameter and handshake duration was
controlled by HTTP/3. However that required creating and storing HTTP/3
session on first client datagram. Apparently there's no convenient way to
store the session object until QUIC handshake is complete. In the followup
patches session creation will be postponed to init() callback.
Diffstat (limited to 'src/event/quic/ngx_event_quic.c')
| -rw-r--r-- | src/event/quic/ngx_event_quic.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/event/quic/ngx_event_quic.c b/src/event/quic/ngx_event_quic.c index 6852bb070..0032a5505 100644 --- a/src/event/quic/ngx_event_quic.c +++ b/src/event/quic/ngx_event_quic.c @@ -211,6 +211,8 @@ ngx_quic_run(ngx_connection_t *c, ngx_quic_conf_t *conf) qc = ngx_quic_get_connection(c); ngx_add_timer(c->read, qc->tp.max_idle_timeout); + ngx_add_timer(&qc->close, qc->conf->handshake_timeout); + ngx_quic_connstate_dbg(c); c->read->handler = ngx_quic_input_handler; @@ -485,6 +487,10 @@ ngx_quic_close_connection(ngx_connection_t *c, ngx_int_t rc) ngx_quic_free_frames(c, &qc->send_ctx[i].sent); } + if (qc->close.timer_set) { + ngx_del_timer(&qc->close); + } + if (rc == NGX_DONE) { /* |
