Skip to content

Commit

Permalink
Toggle the ZeroChecksum heuristics
Browse files Browse the repository at this point in the history
Toggle every 3 packets in cases of heavy packet loss to allow
Association to recover
  • Loading branch information
Sean-Der committed Apr 3, 2024
1 parent b6135a7 commit 5422eb6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions association.go
Original file line number Diff line number Diff line change
Expand Up @@ -2556,9 +2556,9 @@ func (a *Association) onRetransmissionTimeout(id int, nRtos uint) {
defer a.lock.Unlock()

// TSN hasn't been incremented in 3 attempts. Speculatively
// disable ZeroChecksum because old Pion versions had a broken implementation
if a.cumulativeTSNAckPoint+1 == a.initialTSN && nRtos == 3 {
a.sendZeroChecksum = false
// toggle ZeroChecksum because old Pion versions had a broken implementation
if a.cumulativeTSNAckPoint+1 == a.initialTSN && nRtos%3 == 0 {
a.sendZeroChecksum = !a.sendZeroChecksum
}

if id == timerT1Init {
Expand Down

0 comments on commit 5422eb6

Please sign in to comment.