Skip to content

fix: add code 1000 to onclose handler in WebSocketStream - #2086

Merged
lukasIO merged 2 commits into
livekit:mainfrom
phaitonican:close-fix
Sep 7, 2026
Merged

fix: add code 1000 to onclose handler in WebSocketStream#2086
lukasIO merged 2 commits into
livekit:mainfrom
phaitonican:close-fix

Conversation

@phaitonican

Copy link
Copy Markdown
Contributor

React Native's WebSocket never sets wasClean (react-native:267), so livekit-client treats every close as unexpected — even the normal code-1000 close that happens on disconnect. On web wasClean is set, so it's silent; on mobile it logs WS closed unexpectedly with code 1000 + error reading from signal stream.

@changeset-bot

changeset-bot Bot commented Sep 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4515b19

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

@CLAassistant

CLAassistant commented Sep 5, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@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.

Devin Review

Add code 1000 to onclose handler in WebSocketStream.
@lukasIO

lukasIO commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

This makes sense, thanks for the PR!

@lukasIO
lukasIO merged commit 8054c66 into livekit:main Sep 7, 2026
4 of 5 checks passed
@github-actions github-actions Bot mentioned this pull request Sep 7, 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.

3 participants