ignore packets smaller than LeastUnacked of a StopWaiting

ref #196
This commit is contained in:
Marten Seemann
2016-07-03 23:32:08 +08:00
parent 8071fda5ee
commit 1d358a031f
2 changed files with 12 additions and 0 deletions

View File

@@ -244,6 +244,10 @@ func (s *Session) handlePacketImpl(remoteAddr interface{}, hdr *publicHeader, da
if err == ackhandlerlegacy.ErrDuplicatePacket {
return nil
}
// ignore packets with packet numbers smaller than the LeastUnacked of a StopWaiting
if err == ackhandlerlegacy.ErrPacketSmallerThanLastStopWaiting {
return nil
}
if err != nil {
return err