Skip to content

VAPI-3239 fix: wait for init() before handling a subscribe SDP offer#10

Closed
smoghe-bw wants to merge 1 commit into
mainfrom
fix/subscribe-sdp-offer-init-race
Closed

VAPI-3239 fix: wait for init() before handling a subscribe SDP offer#10
smoghe-bw wants to merge 1 commit into
mainfrom
fix/subscribe-sdp-offer-init-race

Conversation

@smoghe-bw

Copy link
Copy Markdown
Contributor

The "ready" and "init" signaling events aren't sequenced against each other, so a subscribe SDP offer can arrive and be dispatched to handleSubscribeSdpOffer before init() finishes creating subscribingPeerConnection. This previously threw "No subscribing RTCPeerConnection, cannot handle SDP offer" and silently dropped the offer, leaving that leg without subscribed media.

handleSubscribeSdpOffer now waits on a readiness promise that init() resolves once subscribingPeerConnection exists, bounded by a timeout so a connection that never initializes doesn't hang the subscribe mutex forever.

The "ready" and "init" signaling events aren't sequenced against each
other, so a subscribe SDP offer can arrive and be dispatched to
handleSubscribeSdpOffer before init() finishes creating
subscribingPeerConnection. This previously threw "No subscribing
RTCPeerConnection, cannot handle SDP offer" and silently dropped the
offer, leaving that leg without subscribed media.

handleSubscribeSdpOffer now waits on a readiness promise that init()
resolves once subscribingPeerConnection exists, bounded by a timeout so
a connection that never initializes doesn't hang the subscribe mutex
forever.
@smoghe-bw smoghe-bw requested review from a team as code owners July 7, 2026 20:21
@bwappsec

bwappsec commented Jul 7, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@smoghe-bw smoghe-bw closed this Jul 7, 2026
@smoghe-bw smoghe-bw deleted the fix/subscribe-sdp-offer-init-race branch July 7, 2026 21:03
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