private-octopus / picoquic

Minimal implementation of the QUIC protocol
MIT License
523 stars 153 forks source link

Revise loss on timer #1683

Closed huitema closed 2 months ago

huitema commented 2 months ago

The previous code had a special timer behavior to capture scenarios when RACK fails. One such scenario is when the app is app-limited, and sends a slow drip of short packets. RACK only kicks in when the last packet is too old, thus the application could keep adding packets for a long time without detecting that something is wrong. Thus, we have a secondary timer, double the normal retransmission timer, but based on the first non-acked packet instead of the last packet sent.

There was a bug in the implementation. If it fired for one packet, it would fire as well for many of the following packets. Too many retransmissions were added to the queue. The PR fixes that.