Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recovery: pseudo code update for changes in #4421 #4426

Merged
merged 4 commits into from
Dec 10, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions draft-ietf-quic-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -1806,14 +1806,15 @@ Invoked when DetectAndRemoveLostPackets deems packets lost.

~~~
OnPacketsLost(lost_packets):
time_of_last_in_flight_packet = 0
latest_in_flight_lost = 0
// Remove lost packets from bytes_in_flight.
for lost_packet in lost_packets:
if lost_packet.in_flight:
bytes_in_flight -= lost_packet.sent_bytes
time_of_last_in_flight_packet = max(time_of_last_in_flight_packet, lost_packet.time_sent)
if (time_of_last_in_flight_packet != 0):
OnCongestionEvent(time_of_last_in_flight_packet)
latest_in_flight_lost = max(latest_in_flight_lost, lost_packet.time_sent)
janaiyengar marked this conversation as resolved.
Show resolved Hide resolved
// Congestion event if any in-flight packets were lost
janaiyengar marked this conversation as resolved.
Show resolved Hide resolved
if (latest_in_flight_lost != 0):
OnCongestionEvent(latest_in_flight_lost)

// Reset the congestion window if the loss of these
// packets indicates persistent congestion.
Expand Down