Skip to content

Conversation

Chriztiaan
Copy link
Contributor

@Chriztiaan Chriztiaan commented Mar 26, 2025

This PR resolves an issue related to sequential connect() calls breaking all syncing and never reaching a connected state.
Two typical scenarios that can cause this is switching client parameters and React's StrictMode which does multiple calls of hooks like useEffect.

This PR ensures that locks used for internal connection sharing are unique.

Alternative to #545

Thanks @simolus3 for suggesting this approach.

Copy link

changeset-bot bot commented Mar 26, 2025

🦋 Changeset detected

Latest commit: fe7d021

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

This PR includes changesets to release 2 packages
Name Type
@powersync/web Minor
@powersync/diagnostics-app 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

@Chriztiaan Chriztiaan marked this pull request as ready for review March 26, 2025 14:46
@Chriztiaan Chriztiaan requested a review from simolus3 March 26, 2025 14:48
@Chriztiaan Chriztiaan merged commit fafd562 into main Mar 26, 2025
6 checks passed
@Chriztiaan Chriztiaan deleted the fix/multiple-connect-calls branch March 26, 2025 14: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