Skip to content

Conversation

@davidliu
Copy link
Contributor

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Dec 23, 2025

🦋 Changeset detected

Latest commit: 47bc518

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

return@runBlocking
}
networkCallbackManager.unregisterCallback()
hasLostConnectivity = false
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch! I had this on my list to look at.
Minor concern: consider adding @Volatile in the declaration to make it:

@Volatile
private var hasLostConnectivity: Boolean = false

Network callbacks run on the system's ConnectivityManager thread, while room operations run on coroutine dispatchers. While the current code is functionally safe (unregister happens before reset, so no concurrent access), adding @Volatile would be a good defensive move, imo.

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