don't reduce the congestion window when a path MTU probe packet is lost

This commit is contained in:
Marten Seemann 2021-02-13 13:27:29 +08:00
parent ac87292e87
commit 765d26f132
5 changed files with 47 additions and 9 deletions

View file

@ -1480,6 +1480,7 @@ var _ = Describe("Packet packer", func() {
Expect(p.header.PacketNumber).To(Equal(protocol.PacketNumber(0x43)))
Expect(p.EncryptionLevel()).To(Equal(protocol.Encryption1RTT))
Expect(p.buffer.Data).To(HaveLen(int(probePacketSize)))
Expect(p.packetContents.isMTUProbePacket).To(BeTrue())
})
})
})
@ -1510,6 +1511,14 @@ var _ = Describe("Converting to AckHandler packets", func() {
Expect(p.LargestAcked).To(Equal(protocol.InvalidPacketNumber))
})
It("marks MTU probe packets", func() {
packet := &packetContents{
header: &wire.ExtendedHeader{Header: wire.Header{}},
isMTUProbePacket: true,
}
Expect(packet.ToAckHandlerPacket(time.Now(), nil).IsPathMTUProbePacket).To(BeTrue())
})
DescribeTable(
"doesn't overwrite the OnLost callback, if it is set",
func(hdr wire.Header) {