Skip to content

TEL-562: make media timeout detection more deterministic#675

Open
hechen-eng wants to merge 3 commits intomainfrom
stable-media-timeout
Open

TEL-562: make media timeout detection more deterministic#675
hechen-eng wants to merge 3 commits intomainfrom
stable-media-timeout

Conversation

@hechen-eng
Copy link
Copy Markdown
Contributor

No description provided.

@hechen-eng hechen-eng requested a review from a team as a code owner May 5, 2026 23:52
Comment thread pkg/sip/media_port.go
}
p.timeoutInitial.Store(&opts.MediaTimeoutInitial)
p.timeoutGeneral.Store(&opts.MediaTimeout)
go p.timeoutLoop(tid, func() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the tid. It helps find stuck media loops for specific calls.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see tid is actually used in the old code. Do we still need it 🤔

Comment thread pkg/sip/media_port.go Outdated
Comment thread pkg/sip/media_port.go Outdated
Comment thread pkg/sip/media_port.go
"sinceLast", time.Since(lastTime),
"sinceStart", time.Since(startTime),
)
if curPackets == startPackets {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better keep this one, it helped find quite a few random deadlocks on the media path.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we now check whether it's isInitial using lastPacketTime.Before(startTime), which should be sufficient? logs are also preserved from line 520 to 525

@hechen-eng hechen-eng force-pushed the stable-media-timeout branch from da2fc8c to ddbef65 Compare May 6, 2026 17:35
@hechen-eng
Copy link
Copy Markdown
Contributor Author

made the change to reset the timer by comparing with lastPacketTime 👍

@hechen-eng hechen-eng requested review from a team and dennwc May 6, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants