Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions association.go
Original file line number Diff line number Diff line change
Expand Up @@ -1969,11 +1969,11 @@ func (a *Association) processSelectiveAck(selectiveAckChunk *chunkSelectiveAck)
newestDeliveredOrigTSN = chunkPayload.tsn
deliveredFound = true
}
}

if a.inFastRecovery && chunkPayload.tsn == a.fastRecoverExitPoint {
a.log.Debugf("[%s] exit fast-recovery", a.name)
a.inFastRecovery = false
}
if a.inFastRecovery && chunkPayload.tsn == a.fastRecoverExitPoint {
a.log.Debugf("[%s] exit fast-recovery", a.name)
a.inFastRecovery = false
}
}

Expand Down
22 changes: 22 additions & 0 deletions association_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4326,6 +4326,28 @@ func TestRACK_PTO_DoesNotProbe_WhenPendingExists(t *testing.T) {
assert.False(t, got.retransmit, "PTO must prefer sending pending data over probing")
}

func TestFastRecoveryExitOnAckedExitPoint(t *testing.T) {
assoc := newRackTestAssoc(t)

now := time.Now()
assoc.inflightQueue.pushNoCheck(mkChunk(100, now.Add(-20*time.Millisecond)))
assoc.inflightQueue.pushNoCheck(mkChunk(101, now.Add(-10*time.Millisecond)))

assoc.inflightQueue.markAsAcked(101)
assoc.inFastRecovery = true
assoc.fastRecoverExitPoint = 101

assoc.lock.Lock()
_, _, _, _, _, err := assoc.processSelectiveAck(&chunkSelectiveAck{ //nolint:dogsled
cumulativeTSNAck: 101,
})
exited := !assoc.inFastRecovery
assoc.lock.Unlock()

require.NoError(t, err)
assert.True(t, exited, "fast recovery should exit when exit point is cumulatively acked")
}

func TestRTOClearsFastRecovery(t *testing.T) {
assoc := newRackTestAssoc(t)

Expand Down
Loading