forked from quic-go/quic-go
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user