remove unneeded tracking variable in the received packet history

The value was not updated correctly when receiving reordered packets.
Since it's trivial to determine it from the list of received packets,
the easiest fix is to remove it.
This commit is contained in:
Marten Seemann
2019-07-30 11:17:26 +07:00
parent a0b7e468ff
commit f4bb3c12be

View File

@@ -12,8 +12,6 @@ import (
// It does not store packet contents.
type receivedPacketHistory struct {
ranges *utils.PacketIntervalList
lowestInReceivedPacketNumbers protocol.PacketNumber
}
var errTooManyOutstandingReceivedAckRanges = qerr.Error(qerr.InternalError, "Too many outstanding received ACK ranges")
@@ -77,11 +75,6 @@ func (h *receivedPacketHistory) ReceivedPacket(p protocol.PacketNumber) error {
// DeleteBelow deletes all entries below (but not including) p
func (h *receivedPacketHistory) DeleteBelow(p protocol.PacketNumber) {
if p <= h.lowestInReceivedPacketNumbers {
return
}
h.lowestInReceivedPacketNumbers = p
nextEl := h.ranges.Front()
for el := h.ranges.Front(); nextEl != nil; el = nextEl {
nextEl = el.Next()