mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 12:47:36 +03:00
keep increasing the packet number after version negotiation and retry
This commit is contained in:
parent
1abf9e1b37
commit
178ac0dacb
8 changed files with 59 additions and 13 deletions
|
@ -49,7 +49,7 @@ var _ = Describe("SentPacketHandler", func() {
|
|||
|
||||
BeforeEach(func() {
|
||||
rttStats := &congestion.RTTStats{}
|
||||
handler = NewSentPacketHandler(rttStats, utils.DefaultLogger).(*sentPacketHandler)
|
||||
handler = NewSentPacketHandler(42, rttStats, utils.DefaultLogger).(*sentPacketHandler)
|
||||
handler.SetHandshakeComplete()
|
||||
streamFrame = wire.StreamFrame{
|
||||
StreamID: 5,
|
||||
|
@ -962,4 +962,17 @@ var _ = Describe("SentPacketHandler", func() {
|
|||
Expect(packet).To(BeNil())
|
||||
})
|
||||
})
|
||||
|
||||
Context("peeking and popping packet number", func() {
|
||||
It("peeks and pops the initial packet number", func() {
|
||||
pn, _ := handler.PeekPacketNumber()
|
||||
Expect(pn).To(Equal(protocol.PacketNumber(42)))
|
||||
Expect(handler.PopPacketNumber()).To(Equal(protocol.PacketNumber(42)))
|
||||
})
|
||||
|
||||
It("peeks and pops beyond the initial packet number", func() {
|
||||
Expect(handler.PopPacketNumber()).To(Equal(protocol.PacketNumber(42)))
|
||||
Expect(handler.PopPacketNumber()).To(BeNumerically(">", 42))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue