pad all Initial packets sent by the client

This commit is contained in:
Marten Seemann
2018-11-28 10:14:47 +07:00
parent 92edfc16ea
commit 9313557b81

View File

@@ -429,7 +429,7 @@ func (p *packetPacker) writeAndSealPacket(
raw := *getPacketBuffer()
buffer := bytes.NewBuffer(raw[:0])
addPadding := p.perspective == protocol.PerspectiveClient && header.Type == protocol.PacketTypeInitial && !p.hasSentPacket
addPadding := p.perspective == protocol.PerspectiveClient && header.Type == protocol.PacketTypeInitial
// the length is only needed for Long Headers
if header.IsLongHeader {