remove old code to send an ACK every 20 packets

This was needed before QUIC 39, and should have been removed when we
dropped support for QUIC 38.
This commit is contained in:
Marten Seemann
2017-12-01 12:08:12 +07:00
parent ccd91a36b7
commit 184f81d8c4
3 changed files with 2 additions and 27 deletions

View File

@@ -77,15 +77,6 @@ func (h *receivedPacketHandler) maybeQueueAck(packetNumber protocol.PacketNumber
h.ackQueued = true
}
if h.version < protocol.Version39 {
// Always send an ack every 20 packets in order to allow the peer to discard
// information from the SentPacketManager and provide an RTT measurement.
// From QUIC 39, this is not needed anymore, since the peer will regularly send a retransmittable packet.
if h.packetsReceivedSinceLastAck >= protocol.MaxPacketsReceivedBeforeAckSend {
h.ackQueued = true
}
}
// if the packet number is smaller than the largest acked packet, it must have been reported missing with the last ACK
// note that it cannot be a duplicate because they're already filtered out by ReceivedPacket()
if h.lastAck != nil && packetNumber < h.lastAck.LargestAcked {