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

Fix fetch loader abort in progressive mode #6066

Merged
merged 1 commit into from
Dec 27, 2023

Conversation

robwalch
Copy link
Collaborator

This PR will...

Abort fetch loader as long as loading has not ended.

Why is this Pull Request needed?

Fetch response.ok is true as soon as status 200 is returned. In progressive mode, this is set and can be read before all data is loaded and the handling the response is complete.

Are there any points in the code the reviewer needs to double check?

Instead of checking the response status, !stats.loading.end indicates that loading is incomplete and it is OK to abort. stats.loading.end is only set after receiving all data and handling the final response before invoking the loader onSuccess callback.

Resolves issues:

Fixes #6054

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

@robwalch robwalch added this to the 1.5.0 milestone Dec 26, 2023
@robwalch robwalch merged commit a9485d0 into master Dec 27, 2023
15 of 16 checks passed
@robwalch robwalch deleted the bugfix/fetch-loader-abort branch December 27, 2023 20:49
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.

Frag doesn't abort when seeking frequently if progressive is set to true.
1 participant