Mercurial > hg > nginx
comparison src/event/quic/ngx_event_quic.c @ 9158:ad3d34ddfdcc
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.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Wed, 13 Sep 2023 17:59:37 +0400 |
parents | daf8f5ba23d8 |
children | dd5fd5719027 |
comparison
equal
deleted
inserted
replaced
9157:daf8f5ba23d8 | 9158:ad3d34ddfdcc |
---|---|
209 | 209 |
210 /* quic connection is now created */ | 210 /* quic connection is now created */ |
211 qc = ngx_quic_get_connection(c); | 211 qc = ngx_quic_get_connection(c); |
212 | 212 |
213 ngx_add_timer(c->read, qc->tp.max_idle_timeout); | 213 ngx_add_timer(c->read, qc->tp.max_idle_timeout); |
214 ngx_add_timer(&qc->close, qc->conf->handshake_timeout); | |
215 | |
214 ngx_quic_connstate_dbg(c); | 216 ngx_quic_connstate_dbg(c); |
215 | 217 |
216 c->read->handler = ngx_quic_input_handler; | 218 c->read->handler = ngx_quic_input_handler; |
217 | 219 |
218 return; | 220 return; |
481 | 483 |
482 /* drop packets from retransmit queues, no ack is expected */ | 484 /* drop packets from retransmit queues, no ack is expected */ |
483 for (i = 0; i < NGX_QUIC_SEND_CTX_LAST; i++) { | 485 for (i = 0; i < NGX_QUIC_SEND_CTX_LAST; i++) { |
484 ngx_quic_free_frames(c, &qc->send_ctx[i].frames); | 486 ngx_quic_free_frames(c, &qc->send_ctx[i].frames); |
485 ngx_quic_free_frames(c, &qc->send_ctx[i].sent); | 487 ngx_quic_free_frames(c, &qc->send_ctx[i].sent); |
488 } | |
489 | |
490 if (qc->close.timer_set) { | |
491 ngx_del_timer(&qc->close); | |
486 } | 492 } |
487 | 493 |
488 if (rc == NGX_DONE) { | 494 if (rc == NGX_DONE) { |
489 | 495 |
490 /* | 496 /* |