Skip to content

Commit 5766ed8

Browse files
committed
Avoid repeating batches on timer
1 parent 8950f5d commit 5766ed8

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

picoquic/loss_recovery.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -641,22 +641,20 @@ static int picoquic_is_packet_probably_lost(picoquic_cnx_t* cnx,
641641
*is_timer_expired = 1;
642642
}
643643
}
644-
else {
644+
else if (old_p->send_path->nb_retransmit == 0) {
645645
/* RACK has failure modes if the sender keeps adding small packets to the
646-
* retransmit queue. In that case, we pick a safe timer based retransmit.
646+
* retransmit queue. This may push the send time of the "last" packet
647+
* beyond a reasonable value.
648+
* In that case, we pick a safe timer based retransmit.
647649
* The "timer" condition will have consequences on congestion control;
648-
* we only set it if the packet is ack eliciting and if another
649-
* path is plausible.
650+
* we only set it if the packet is ack eliciting.
650651
*/
651652
uint64_t alt_retransmit_timer = old_p->send_time + 2*picoquic_current_retransmit_timer(cnx, old_p->send_path);
652653

653654
if (alt_retransmit_timer < last_packet->send_time) {
654655
retransmit_time_timer = alt_retransmit_timer;
655-
656656
if (current_time >= retransmit_time_timer) {
657-
if (picoquic_is_packet_ack_eliciting(old_p) &&
658-
(cnx->is_multipath_enabled || cnx->is_simple_multipath_enabled) &&
659-
cnx->nb_paths > 1)
657+
if (picoquic_is_packet_ack_eliciting(old_p))
660658
{
661659
*is_timer_expired = 1;
662660
}

0 commit comments

Comments
 (0)