remove incorrect error check when sending a packet

There's no need for a check if more than protocol.MaxTrackedSentPackets
packets were sent. There are certain situations where we allow (via
SendingAllowed()) sending of more packets, and we shouldn't throw an
error when the session then actually sends these packets.
This commit is contained in:
Marten Seemann
2018-03-05 17:08:18 +07:00
parent ba00cb9175
commit 2d64953e0e
6 changed files with 43 additions and 104 deletions

View File

@@ -1091,7 +1091,7 @@ var _ = Describe("Session", func() {
Expect(sess.rttStats.SmoothedRTT()).To(Equal(rtt)) // make sure it worked
sess.packer.packetNumberGenerator.next = n + 1
// Now, we send a single packet, and expect that it was retransmitted later
err := sess.sentPacketHandler.SentPacket(&ackhandler.Packet{
sess.sentPacketHandler.SentPacket(&ackhandler.Packet{
PacketNumber: n,
Length: 1,
Frames: []wire.Frame{&wire.StreamFrame{
@@ -1099,7 +1099,6 @@ var _ = Describe("Session", func() {
}},
EncryptionLevel: protocol.EncryptionForwardSecure,
})
Expect(err).NotTo(HaveOccurred())
go sess.run()
defer sess.Close(nil)
sess.scheduleSending()