forked from quic-go/quic-go
ackhandler: use an iterator to process received packet ranges (#5309)
* ackhandler: use an interator to track received packet ranges * use slices.Collect * naming convention
This commit is contained in:
@@ -61,7 +61,9 @@ func (h *receivedPacketTracker) GetAckFrame() *wire.AckFrame {
|
||||
ack.ECT0 = h.ect0
|
||||
ack.ECT1 = h.ect1
|
||||
ack.ECNCE = h.ecnce
|
||||
ack.AckRanges = h.packetHistory.AppendAckRanges(ack.AckRanges)
|
||||
for r := range h.packetHistory.Backward() {
|
||||
ack.AckRanges = append(ack.AckRanges, wire.AckRange{Smallest: r.Start, Largest: r.End})
|
||||
}
|
||||
|
||||
h.lastAck = ack
|
||||
h.hasNewAck = false
|
||||
|
||||
Reference in New Issue
Block a user