Simplify control flow in sync iteration - #82
Open
Chriztiaan wants to merge 3 commits into
Open
Conversation
simolus3
reviewed
Jul 27, 2026
`NonInterruptingInstruction` abstract subclass, matching powersync.dart.
Chriztiaan
marked this pull request as ready for review
July 28, 2026 09:53
simolus3
reviewed
Jul 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This ports similar changes from the JS SDK (itself a port of powersync.dart#410) to the sync client in the .NET SDK.
Addresses #81.
When a sync stream closed, a few already-queued messages could still be sent to the sync core after it had stopped listening. Those turned into
No iteration is activeerrors that surfaced in crash reporting without the app beingable to catch them.
The iteration now processes everything in one sequential loop rather than alongside a background task, so once a stream ends nothing further is sent. Also uses the core's newer
connectioncommand to report connect/disconnect state instead of setting it manually, and makes stream read failures flow into the normal retry path.AI disclosure
This PR was created with the help of Claude Opus 4.8. Help constitutes assistance in research, planning, and rough outline of implementation. Beyond having a hand in the implementation, I have also manually tested this work.