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

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.

1 participant