queue 0-RTT packets for retransmission after receiving a Retry

This commit is contained in:
Marten Seemann
2019-08-15 12:38:25 +07:00
parent afbf5efd01
commit 951477af92
2 changed files with 38 additions and 0 deletions

View File

@@ -598,7 +598,15 @@ func (h *sentPacketHandler) ResetForRetry() error {
h.queueFramesForRetransmission(p)
return true, nil
})
// All application data packets sent at this point are 0-RTT packets.
// In the case of a Retry, we can assume that the server dropped all of them.
h.appDataPackets.history.Iterate(func(p *Packet) (bool, error) {
h.queueFramesForRetransmission(p)
return true, nil
})
h.initialPackets = newPacketNumberSpace(h.initialPackets.pns.Pop())
h.appDataPackets = newPacketNumberSpace(h.appDataPackets.pns.Pop())
h.setLossDetectionTimer()
return nil
}