fix number of ACK blocks for gaps of 254 packets in QUIC 34 ACKs

ref #182
This commit is contained in:
Marten Seemann
2016-06-21 14:20:21 +07:00
parent 74ac98e7a5
commit 4e183194c1
2 changed files with 21 additions and 3 deletions

View File

@@ -312,7 +312,7 @@ func (f *AckFrameNew) numWrittenNackRanges() uint64 {
lastAckRange := f.AckRanges[i-1]
gap := lastAckRange.FirstPacketNumber - ackRange.LastPacketNumber
numRanges += 1 + uint64(gap)/0xFF
numRanges += 1 + uint64(gap)/(0xFF+1)
if uint64(gap)%(0xFF+1) == 0 {
numRanges--
}