Skip to content

Avoid reconnect delay on token prefetch#343

Merged
simolus3 merged 2 commits into
mainfrom
fix-reconnect-delay-after-prefetch
Apr 21, 2026
Merged

Avoid reconnect delay on token prefetch#343
simolus3 merged 2 commits into
mainfrom
fix-reconnect-delay-after-prefetch

Conversation

@simolus3

Copy link
Copy Markdown
Contributor

After pre-fetching a token (a process we start when the service indicates the current JWT is about to expire), we used to send a stop command to powersync_control. This causes us to stop the iteration and await a regular retry delay, which defeats the purpose of pre-fetching tokens in the first place.

The simple fix is to use the refreshed_token command instead.

@simolus3 simolus3 merged commit cfd66f0 into main Apr 21, 2026
24 of 25 checks passed
@simolus3 simolus3 deleted the fix-reconnect-delay-after-prefetch branch April 21, 2026 08:36
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