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

Synchronize EventSource.readyState updates #3

Merged
merged 2 commits into from
May 22, 2021
Merged

Conversation

kdubb
Copy link
Contributor

@kdubb kdubb commented May 21, 2021

Previously readyState was tested and updated at will. Which produced race conditions and could lead to a closed EventSources continuously reopening.

All changes to readyState are now serialized via the dispatch queue. Also updates that aren't the result of an explicit call from external code are checked to ensure they don't re-open an already closed instance.

@kdubb kdubb force-pushed the fix/event_source_sync branch from 5b395e3 to 614473c Compare May 21, 2021 23:03
@kdubb kdubb merged commit 672351d into main May 22, 2021
@kdubb kdubb deleted the fix/event_source_sync branch May 22, 2021 00:09
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.

1 participant