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

@ -99,6 +99,13 @@ func (h *sentPacketHandler) ShouldSendRetransmittablePacket() bool {
}
func (h *sentPacketHandler) SetHandshakeComplete() {
var queue []*Packet
for _, packet := range h.retransmissionQueue {
if packet.EncryptionLevel == protocol.EncryptionForwardSecure {
queue = append(queue, packet)
}
}
h.retransmissionQueue = queue
h.handshakeComplete = true
}