only delete the acked packet, but none of its retransmissions

This commit is contained in:
Marten Seemann
2018-03-30 13:26:26 +07:00
parent 0652eb97a0
commit 42d35360bb
5 changed files with 168 additions and 165 deletions

View File

@@ -18,7 +18,10 @@ type Packet struct {
largestAcked protocol.PacketNumber // if the packet contains an ACK, the LargestAcked value of that ACK
queuedForRetransmission bool
// There are two reasons why a packet cannot be retransmitted:
// * it was already retransmitted
// * this packet is a retransmission, and we already received an ACK for the original packet
canBeRetransmitted bool
includedInBytesInFlight bool
retransmittedAs []protocol.PacketNumber
isRetransmission bool // we need a separate bool here because 0 is a valid packet number