Skip to content

Commit

Permalink
Add an assert
Browse files Browse the repository at this point in the history
Only in_flight packets are added to lost_packets, so adding an assert to improve readability.
  • Loading branch information
ianswett committed Nov 25, 2020
1 parent a435847 commit bffe282
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions draft-ietf-quic-recovery.md
Expand Up @@ -1805,6 +1805,7 @@ Invoked when DetectAndRemoveLostPackets deems packets lost.
OnPacketsLost(lost_packets):
// Remove lost packets from bytes_in_flight.
for lost_packet in lost_packets:
assert(lost_packet.in_flight)
bytes_in_flight -= lost_packet.sent_bytes
OnCongestionEvent(lost_packets.largest().time_sent)

Expand Down

0 comments on commit bffe282

Please sign in to comment.