summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2020-06-10 21:33:20 +0300
committerVladimir Homutov <vl@nginx.com>2020-06-10 21:33:20 +0300
commit5cef58452d27801c82a3efd790f43e3695085981 (patch)
tree4fe21ecc9c3e8311003ab6cd1022345bd4688bcc /src
parentd684a69c68705460121455e2fab0fe7726b62af3 (diff)
downloadnginx-5cef58452d27801c82a3efd790f43e3695085981.tar.gz
nginx-5cef58452d27801c82a3efd790f43e3695085981.tar.bz2
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.
Diffstat (limited to 'src')
-rw-r--r--src/event/ngx_event_quic.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c
index 11895d4e6..56cf9d06f 100644
--- a/src/event/ngx_event_quic.c
+++ b/src/event/ngx_event_quic.c
@@ -3058,7 +3058,8 @@ ngx_quic_output(ngx_connection_t *c)
}
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 @@ ngx_quic_retransmit(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx,
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 @@ ngx_quic_retransmit(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx,
/* 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));