Mercurial > hg > nginx
changeset 8431:70335ec6e5d4 quic
Increased default initial retransmit timeout.
This is a temporary workaround, proper retransmission mechanism based on
quic-recovery rfc draft is yet to be implemented.
Currently hardcoded value is too small for real networks. The patch
sets static PTO, considering rtt of ~333ms, what gives about 1s.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 10 Jun 2020 21:33:20 +0300 |
parents | 6fec79e43694 |
children | 391d06a51bc0 |
files | src/event/ngx_event_quic.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/event/ngx_event_quic.c Wed Jun 10 21:23:10 2020 +0300 +++ b/src/event/ngx_event_quic.c Wed Jun 10 21:33:20 2020 +0300 @@ -3058,7 +3058,8 @@ } if (!qc->retransmit.timer_set && !qc->closing) { - ngx_add_timer(&qc->retransmit, qc->ctp.max_ack_delay); + ngx_add_timer(&qc->retransmit, + qc->ctp.max_ack_delay + NGX_QUIC_HARDCODED_PTO); } return NGX_OK; @@ -3414,7 +3415,8 @@ do { start = ngx_queue_data(q, ngx_quic_frame_t, queue); - wait = start->last + qc->ctp.max_ack_delay - now; + wait = start->last + qc->ctp.max_ack_delay + + NGX_QUIC_HARDCODED_PTO - now; if ((ngx_msec_int_t) wait > 0) { break; @@ -3455,7 +3457,7 @@ /* move frames group to the end of queue */ ngx_queue_add(&ctx->sent, &range); - wait = qc->tp.max_ack_delay; + wait = qc->ctp.max_ack_delay + NGX_QUIC_HARDCODED_PTO; } while (q != ngx_queue_sentinel(&ctx->sent));