accept duplicate and delayed packets

We used to reject duplicate and packets with packet numbers lower than
the LeastUnacked we received in a STOP_WAITING frame, because we didn't
accept overlapping stream data. For all other frames, duplicates never
were an issue. Now that we accept overlapping stream data, there's no
need to reject those packets, in fact, processing a delayed packet will
be beneficial for performance.
This commit is contained in:
Marten Seemann 2017-06-08 14:40:55 +02:00
parent 94843e1919
commit 14fa2dc7dd
No known key found for this signature in database
GPG key ID: 3603F40B121FCDEA
4 changed files with 20 additions and 53 deletions

View file

@ -813,7 +813,7 @@ var _ = Describe("Session", func() {
Expect(sess.largestRcvdPacketNumber).To(Equal(protocol.PacketNumber(5)))
})
It("ignores duplicate packets", func() {
It("handles duplicate packets", func() {
hdr.PacketNumber = 5
err := sess.handlePacketImpl(&receivedPacket{publicHeader: hdr})
Expect(err).ToNot(HaveOccurred())
@ -821,7 +821,7 @@ var _ = Describe("Session", func() {
Expect(err).ToNot(HaveOccurred())
})
It("ignores packets smaller than the highest LeastUnacked of a StopWaiting", func() {
It("handles packets smaller than the highest LeastUnacked of a StopWaiting", func() {
err := sess.receivedPacketHandler.ReceivedStopWaiting(&frames.StopWaitingFrame{LeastUnacked: 10})
Expect(err).ToNot(HaveOccurred())
hdr.PacketNumber = 5