mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 20:57:36 +03:00
only send one ACK for every 10 retransmittable packets
This commit is contained in:
parent
96a31a51e5
commit
fc5f54824a
2 changed files with 10 additions and 6 deletions
|
@ -95,13 +95,17 @@ var _ = Describe("receivedPacketHandler", func() {
|
|||
Expect(handler.GetAlarmTimeout()).To(BeZero())
|
||||
})
|
||||
|
||||
It("queues an ACK for every second retransmittable packet, if they are arriving fast", func() {
|
||||
It("queues an ACK for every RetransmittablePacketsBeforeAck retransmittable packet, if they are arriving fast", func() {
|
||||
receiveAndAck10Packets()
|
||||
err := handler.ReceivedPacket(11, time.Time{}, true)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(handler.ackQueued).To(BeFalse())
|
||||
p := protocol.PacketNumber(11)
|
||||
for i := 0; i < protocol.RetransmittablePacketsBeforeAck-1; i++ {
|
||||
err := handler.ReceivedPacket(p, time.Time{}, true)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(handler.ackQueued).To(BeFalse())
|
||||
p++
|
||||
}
|
||||
Expect(handler.GetAlarmTimeout()).NotTo(BeZero())
|
||||
err = handler.ReceivedPacket(12, time.Time{}, true)
|
||||
err := handler.ReceivedPacket(p, time.Time{}, true)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(handler.ackQueued).To(BeTrue())
|
||||
Expect(handler.GetAlarmTimeout()).To(BeZero())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue