delete non-forward-secure retransmissions when the handshake completes

This commit is contained in:
Marten Seemann 2018-01-05 14:22:42 +07:00
parent 5cd5d5dae9
commit b0ab718c7a
4 changed files with 37 additions and 32 deletions

View file

@ -1000,22 +1000,6 @@ var _ = Describe("Session", func() {
Expect(sent).To(BeTrue())
Expect(mconn.written).To(HaveLen(1))
})
It("doesn't retransmit handshake packets when the handshake is complete", func() {
sess.handshakeComplete = true
sf := &wire.StreamFrame{StreamID: 1, Data: []byte("foobar")}
sph.EXPECT().DequeuePacketForRetransmission().Return(
&ackhandler.Packet{
Frames: []wire.Frame{sf},
EncryptionLevel: protocol.EncryptionSecure,
})
sph.EXPECT().DequeuePacketForRetransmission()
sph.EXPECT().ShouldSendRetransmittablePacket()
sent, err := sess.sendPacket()
Expect(err).NotTo(HaveOccurred())
Expect(sent).To(BeFalse())
Expect(mconn.written).To(BeEmpty())
})
})
Context("for packets after the handshake", func() {