It was possible that retransmit timer was not set after the first
retransmission attempt, due to ngx_quic_retransmit() did not set
wait time properly, and the condition in retransmit handler was incorrect.
if (i == 0) {
wait = nswait;
- } else if (nswait > 0 && nswait < wait) {
+ } else if (nswait > 0 && (wait == 0 || wait > nswait)) {
wait = nswait;
}
}
/* move frames group to the end of queue */
ngx_queue_add(&ctx->sent, &range);
+ wait = qc->tp.max_ack_delay;
+
} while (q != ngx_queue_sentinel(&ctx->sent));
*waitp = wait;