Skip to content

Conversation

@adrian-niculescu
Copy link
Contributor

@adrian-niculescu adrian-niculescu commented Nov 24, 2025

Added @Volatile to isConnected, currentWs, and isReconnecting fields in SignalClient to ensure proper memory visibility across threads.

These fields are accessed from multiple threads (OkHttp WebSocket callbacks and IO dispatcher coroutines) without synchronization, which could cause:

  • Messages silently dropped if the callback thread doesn't see the updated currentWs
  • Message sending failures if the IO dispatcher doesn't see the updated connection state

Added @volatile to isConnected, currentWs, and isReconnecting fields
that are accessed from multiple threads (OkHttp callbacks and IO
dispatcher coroutines).
@changeset-bot
Copy link

changeset-bot bot commented Nov 24, 2025

🦋 Changeset detected

Latest commit: 7e84264

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

This PR includes changesets to release 1 package
Name Type
client-sdk-android 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

Copy link
Contributor

@davidliu davidliu left a comment

Choose a reason for hiding this comment

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

LGTM!

@davidliu davidliu merged commit c07d159 into livekit:main Dec 16, 2025
2 checks passed
@davidliu davidliu mentioned this pull request Dec 16, 2025
@adrian-niculescu adrian-niculescu deleted the fix-signal-client-volatile branch December 16, 2025 17:08
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