Skip to content

fix: cancel pending onTrack callbacks when subscription fails#2019

Merged
lukasIO merged 5 commits into
mainfrom
lukas/subscribed-race
Jul 27, 2026
Merged

fix: cancel pending onTrack callbacks when subscription fails#2019
lukasIO merged 5 commits into
mainfrom
lukas/subscribed-race

Conversation

@lukasIO

@lukasIO lukasIO commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@changeset-bot

changeset-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f9f3eba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
livekit-client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@lukasIO
lukasIO marked this pull request as draft July 24, 2026 09:17
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
dist/livekit-client.esm.mjs 104.79 KB (+0.1% 🔺)
dist/livekit-client.umd.js 113.78 KB (+0.07% 🔺)

@devin-ai-integration devin-ai-integration Bot left a comment

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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@lukasIO
lukasIO requested a review from boks1971 July 24, 2026 11:36
@lukasIO
lukasIO marked this pull request as ready for review July 24, 2026 11:39
@1egoman

1egoman commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

I think I get the general idea and it makes sense, I'll let @boks1971 provide the actual review unless I am tagged explicitly otherwise.

@boks1971 boks1971 left a comment

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.

lgtm! One comment on track SID.

I do not understand the test though. I just cannot wrap my head around what is definition what is implementation :-)

Comment thread src/room/utils.ts
@lukasIO

lukasIO commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

I do not understand the test though. I just cannot wrap my head around what is definition what is implementation :-)

fair point. It's quite contrived due to synthesising a lot of state for this specific case.
The only goal of that test is to ensure that the onTrackAdded isn't invoked if we receive a subscription failure before the room is completely connected.
I threw out a bunch of the synthetisation and let the test be driven by the media track added event on the engine now.

@lukasIO
lukasIO merged commit d04afe7 into main Jul 27, 2026
6 checks passed
@lukasIO
lukasIO deleted the lukas/subscribed-race branch July 27, 2026 13:42
@github-actions github-actions Bot mentioned this pull request Jul 27, 2026
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.

4 participants