correctly treat LeastUnacked value in a StopWaitingFrame

This commit is contained in:
Marten Seemann 2016-04-30 19:00:01 +07:00
parent f3e7fd438e
commit 733873fa5e
2 changed files with 5 additions and 4 deletions

View file

@ -53,7 +53,8 @@ func (h *receivedPacketHandler) ReceivedStopWaiting(f *frames.StopWaitingFrame)
return nil
}
h.highestInOrderObserved = f.LeastUnacked
// the LeastUnacked is the smallest packet number of any packet for which the sender is still awaiting an ack. So the highestInOrderObserved is one less than that
h.highestInOrderObserved = f.LeastUnacked - 1
h.highestInOrderObservedEntropy = EntropyAccumulator(f.Entropy)
return nil