Remove PackPacket's control frames parameter

With this change it would theoretically be possible for outdated control frames to be sent, but this is quite unlikely in practice.
This commit is contained in:
Lucas Clemente
2017-06-19 17:26:15 +02:00
parent d7ddadc7b7
commit 495399ede6
3 changed files with 47 additions and 41 deletions

View File

@@ -71,8 +71,7 @@ func (p *packetPacker) RetransmitNonForwardSecurePacket(stopWaitingFrame *frames
// PackPacket packs a new packet
// the stopWaitingFrame is *guaranteed* to be included in the next packet
// the other controlFrames are sent in the next packet, but might be queued and sent in the next packet if the packet would overflow MaxPacketSize otherwise
func (p *packetPacker) PackPacket(stopWaitingFrame *frames.StopWaitingFrame, controlFrames []frames.Frame, leastUnacked protocol.PacketNumber) (*packedPacket, error) {
p.controlFrames = append(p.controlFrames, controlFrames...)
func (p *packetPacker) PackPacket(stopWaitingFrame *frames.StopWaitingFrame, leastUnacked protocol.PacketNumber) (*packedPacket, error) {
return p.packPacket(stopWaitingFrame, leastUnacked, nil)
}