Mercurial > hg > nginx-quic
comparison src/event/ngx_event_quic.c @ 7926: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 |
comparison
equal
deleted
inserted
replaced
7925:6fec79e43694 | 7926:70335ec6e5d4 |
---|---|
3056 qc->send_timer_set = 1; | 3056 qc->send_timer_set = 1; |
3057 ngx_add_timer(c->read, qc->tp.max_idle_timeout); | 3057 ngx_add_timer(c->read, qc->tp.max_idle_timeout); |
3058 } | 3058 } |
3059 | 3059 |
3060 if (!qc->retransmit.timer_set && !qc->closing) { | 3060 if (!qc->retransmit.timer_set && !qc->closing) { |
3061 ngx_add_timer(&qc->retransmit, qc->ctp.max_ack_delay); | 3061 ngx_add_timer(&qc->retransmit, |
3062 qc->ctp.max_ack_delay + NGX_QUIC_HARDCODED_PTO); | |
3062 } | 3063 } |
3063 | 3064 |
3064 return NGX_OK; | 3065 return NGX_OK; |
3065 } | 3066 } |
3066 | 3067 |
3412 q = ngx_queue_head(&ctx->sent); | 3413 q = ngx_queue_head(&ctx->sent); |
3413 | 3414 |
3414 do { | 3415 do { |
3415 start = ngx_queue_data(q, ngx_quic_frame_t, queue); | 3416 start = ngx_queue_data(q, ngx_quic_frame_t, queue); |
3416 | 3417 |
3417 wait = start->last + qc->ctp.max_ack_delay - now; | 3418 wait = start->last + qc->ctp.max_ack_delay |
3419 + NGX_QUIC_HARDCODED_PTO - now; | |
3418 | 3420 |
3419 if ((ngx_msec_int_t) wait > 0) { | 3421 if ((ngx_msec_int_t) wait > 0) { |
3420 break; | 3422 break; |
3421 } | 3423 } |
3422 | 3424 |
3453 } | 3455 } |
3454 | 3456 |
3455 /* move frames group to the end of queue */ | 3457 /* move frames group to the end of queue */ |
3456 ngx_queue_add(&ctx->sent, &range); | 3458 ngx_queue_add(&ctx->sent, &range); |
3457 | 3459 |
3458 wait = qc->tp.max_ack_delay; | 3460 wait = qc->ctp.max_ack_delay + NGX_QUIC_HARDCODED_PTO; |
3459 | 3461 |
3460 } while (q != ngx_queue_sentinel(&ctx->sent)); | 3462 } while (q != ngx_queue_sentinel(&ctx->sent)); |
3461 | 3463 |
3462 *waitp = wait; | 3464 *waitp = wait; |
3463 | 3465 |