Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent parallel refreshes #202

Merged
merged 3 commits into from
Feb 1, 2024
Merged

Prevent parallel refreshes #202

merged 3 commits into from
Feb 1, 2024

Conversation

code-asher
Copy link
Member

@code-asher code-asher commented Feb 1, 2024

While adding an automatic refresh I discovered it was easy to
accidentally cause two refreshes to go off at the same time which causes
some races.

Also added a minor tweak to pass in the URL instead of pulling from the
global state since that felt race-y too.

@code-asher code-asher force-pushed the asher/fix-refresh branch 2 times, most recently from f52ad04 to ffdc7df Compare February 1, 2024 05:00
@code-asher code-asher requested a review from Kira-Pilot February 1, 2024 05:02
@code-asher code-asher force-pushed the asher/fix-refresh branch 2 times, most recently from 32392e8 to 72e127e Compare February 1, 2024 05:41
While adding an automatic refresh I discovered it was easy to
accidentally cause two refreshes to go off at the same time which causes
some races.
We already pass the token and since we check the URL before calling
monitorMetadata I think it makes more sense to pass in the URL we
checked over getting it off the global again.
We have to check storage again, otherwise we are just checking the
values we already checked.
@code-asher code-asher merged commit 08ae6f8 into main Feb 1, 2024
2 checks passed
@code-asher code-asher deleted the asher/fix-refresh branch February 1, 2024 22:40
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