From 18ae74fd12cb94c4e599dac40b793c9ef80043ee Mon Sep 17 00:00:00 2001 From: Dmitri Tikhonov Date: Wed, 23 May 2018 10:39:34 -0400 Subject: [PATCH] [BUGFIX] Do not produce packet sequence gaps due to delayed packets --- src/liblsquic/lsquic_send_ctl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/liblsquic/lsquic_send_ctl.c b/src/liblsquic/lsquic_send_ctl.c index dabdc38..a2b1a8e 100644 --- a/src/liblsquic/lsquic_send_ctl.c +++ b/src/liblsquic/lsquic_send_ctl.c @@ -1363,7 +1363,7 @@ lsquic_send_ctl_elide_stream_frames (lsquic_send_ctl_t *ctl, uint32_t stream_id) } } - if (dropped && ctl->sc_n_scheduled) + if (dropped) lsquic_send_ctl_reset_packnos(ctl); for (n = 0; n < sizeof(ctl->sc_buffered_packets) / @@ -1497,7 +1497,7 @@ lsquic_send_ctl_squeeze_sched (lsquic_send_ctl_t *ctl) } } - if (dropped && ctl->sc_n_scheduled) + if (dropped) lsquic_send_ctl_reset_packnos(ctl); #ifndef NDEBUG @@ -1517,7 +1517,6 @@ lsquic_send_ctl_reset_packnos (lsquic_send_ctl_t *ctl) { struct lsquic_packet_out *packet_out; - assert(ctl->sc_n_scheduled > 0); /* Otherwise, why is this called? */ ctl->sc_cur_packno = lsquic_senhist_largest(&ctl->sc_senhist); TAILQ_FOREACH(packet_out, &ctl->sc_scheduled_packets, po_next) packet_out->po_flags |= PO_REPACKNO;