Skip to content

Ensure leave requests can be sent before join response is received#1687

Merged
lukasIO merged 6 commits intomainfrom
lukas/fix-abort
Oct 14, 2025
Merged

Ensure leave requests can be sent before join response is received#1687
lukasIO merged 6 commits intomainfrom
lukas/fix-abort

Conversation

@lukasIO
Copy link
Copy Markdown
Contributor

@lukasIO lukasIO commented Oct 14, 2025

this PR ensures that on aborted connections we still send a LeaveRequest to the server (we could consider adding a new reason for this to not conflate ClientInitiated too much?).

It also ensures that we don't have to wait for joinResponse to be present for a leave request to be initiated by assigning the streamWriter immediately after the ws connection is opened

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Oct 14, 2025

🦋 Changeset detected

Latest commit: 47492cb

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 requested review from 1egoman and boks1971 and removed request for boks1971 October 14, 2025 09:42
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 14, 2025

size-limit report 📦

Path Size
dist/livekit-client.esm.mjs 83.44 KB (-0.13% 🔽)
dist/livekit-client.umd.js 92.02 KB (+0.02% 🔺)

Copy link
Copy Markdown
Contributor

@boks1971 boks1971 left a comment

Choose a reason for hiding this comment

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

lgtm!

}
});

it('should set up stream writer from connection writable', () => {
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.

deleting this as we're setting up the connection writable immediately on ws connection opened now

@lukasIO lukasIO merged commit 2ee73d4 into main Oct 14, 2025
6 checks passed
@lukasIO lukasIO deleted the lukas/fix-abort branch October 14, 2025 09:54
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