retransmit Initial packets as Initial packets

This commit is contained in:
Marten Seemann
2018-02-06 13:44:02 +08:00
parent 4e20ae142c
commit 88da8e2e0a
3 changed files with 20 additions and 0 deletions

View File

@@ -108,6 +108,10 @@ func (p *packetPacker) PackHandshakeRetransmission(packet *ackhandler.Packet) (*
if err != nil {
return nil, err
}
// make sure that the retransmission for an Initial packet is sent as an Initial packet
if packet.PacketType == protocol.PacketTypeInitial {
p.hasSentPacket = false
}
header := p.getHeader(packet.EncryptionLevel)
var frames []wire.Frame
if !p.version.UsesIETFFrameFormat() { // for gQUIC: pack a STOP_WAITING first