mirror of
https://github.com/jech/galene.git
synced 2024-11-22 08:35:57 +01:00
Don't update packetmap for non-increasing seqnos.
When using an identity packetmap, we used to update the next seqno even when packets were not increasing. Not a big deal, we'd still recover at the next sequential packet.
This commit is contained in:
parent
cc52e39ce4
commit
f0bb45e6f4
1 changed files with 5 additions and 2 deletions
|
@ -30,8 +30,11 @@ func (m *Map) Map(seqno uint16, pid uint16) (bool, uint16, uint16) {
|
||||||
defer m.mu.Unlock()
|
defer m.mu.Unlock()
|
||||||
|
|
||||||
if m.delta == 0 && m.entries == nil {
|
if m.delta == 0 && m.entries == nil {
|
||||||
m.next = seqno + 1
|
if compare(m.next, seqno) <= 0 ||
|
||||||
m.nextPid = pid
|
uint16(m.next - seqno) > 8 * 1024 {
|
||||||
|
m.next = seqno + 1
|
||||||
|
m.nextPid = pid
|
||||||
|
}
|
||||||
return true, seqno, 0
|
return true, seqno, 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue