ackhandler: don't delay ACKs for Initial and Handshake packets (#4288)

* ackhandler: don't delay ACKs for Initial and Handshake packets

* ackhandler: embed the receivedPacketHistory
This commit is contained in:
Marten Seemann
2024-02-01 10:13:53 +07:00
committed by GitHub
parent 72c79dbdf5
commit 69ba7acb9f
5 changed files with 158 additions and 109 deletions

View File

@@ -30,14 +30,4 @@ var _ = Describe("Min / Max", func() {
Expect(MinNonZeroDuration(b, a)).To(Equal(b))
Expect(MinNonZeroDuration(time.Minute, time.Hour)).To(Equal(time.Minute))
})
It("returns the minium non-zero time", func() {
a := time.Time{}
b := time.Now()
Expect(MinNonZeroTime(time.Time{}, time.Time{})).To(Equal(time.Time{}))
Expect(MinNonZeroTime(a, b)).To(Equal(b))
Expect(MinNonZeroTime(b, a)).To(Equal(b))
Expect(MinNonZeroTime(b, b.Add(time.Second))).To(Equal(b))
Expect(MinNonZeroTime(b.Add(time.Second), b)).To(Equal(b))
})
})