mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 20:57:36 +03:00
accept multiple ACKs sent in the same packet
This commit is contained in:
parent
b166757fd9
commit
a4128ed469
2 changed files with 3 additions and 3 deletions
|
@ -185,7 +185,7 @@ func (h *sentPacketHandler) ReceivedAck(ackFrame *wire.AckFrame, withPacketNumbe
|
|||
}
|
||||
|
||||
// duplicate or out of order ACK
|
||||
if withPacketNumber != 0 && withPacketNumber <= h.largestReceivedPacketWithAck {
|
||||
if withPacketNumber != 0 && withPacketNumber < h.largestReceivedPacketWithAck {
|
||||
h.logger.Debugf("Ignoring ACK frame (duplicate or out of order).")
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ var _ = Describe("SentPacketHandler", func() {
|
|||
Expect(handler.largestAcked).To(Equal(protocol.PacketNumber(5)))
|
||||
})
|
||||
|
||||
It("rejects duplicate ACKs", func() {
|
||||
It("accepts multiple ACKs sent in the same packet", func() {
|
||||
ack1 := &wire.AckFrame{AckRanges: []wire.AckRange{{Smallest: 0, Largest: 3}}}
|
||||
ack2 := &wire.AckFrame{AckRanges: []wire.AckRange{{Smallest: 0, Largest: 4}}}
|
||||
err := handler.ReceivedAck(ack1, 1337, protocol.Encryption1RTT, time.Now())
|
||||
|
@ -156,7 +156,7 @@ var _ = Describe("SentPacketHandler", func() {
|
|||
// for testing purposes, we pretend send a different ACK frame in a duplicated packet, to be able to verify that it actually doesn't get processed
|
||||
err = handler.ReceivedAck(ack2, 1337, protocol.Encryption1RTT, time.Now())
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(handler.largestAcked).To(Equal(protocol.PacketNumber(3)))
|
||||
Expect(handler.largestAcked).To(Equal(protocol.PacketNumber(4)))
|
||||
})
|
||||
|
||||
It("rejects out of order ACKs", func() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue