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 for Issue 316. Crash: 'Fatal Error: Can't form Range with end < start #422

Merged
merged 1 commit into from
Sep 2, 2016

Conversation

danhollywells
Copy link
Contributor

requestedCount incremented beyond the prefetchedResorces count. See Issue #316

Fix: eliminate requestedCount

Because the start() method captures the initial X Resources by index and ships them off to startPrefetchingResource() and that methods recursive behavior, you can end up in a state where all the items have been processed but the initial X resources will get double processed because they were captured in the for loop in the start() method and again in the recursion of the startPrefetchingResource(). So if during the prefetch you get into this state and you call stop() you will end up with an unbalanced Range when sorting out the failedResources.

…tart' -- requestedCount incremented beyond the prefetchedResorces count.
@codecov-io
Copy link

codecov-io commented Sep 2, 2016

Current coverage is 74.27% (diff: 96.96%)

Merging #422 into master will decrease coverage by 0.22%

@@             master       #422   diff @@
==========================================
  Files            14         14          
  Lines          1694       1691     -3   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits           1262       1256     -6   
- Misses          432        435     +3   
  Partials          0          0          

Powered by Codecov. Last update f3b298a...61025bd

@onevcat
Copy link
Owner

onevcat commented Sep 2, 2016

LGTM! Thanks for pointing this out!

@onevcat onevcat merged commit 35bce77 into onevcat:master Sep 2, 2016
@danhollywells danhollywells deleted the issue-316 branch September 6, 2016 14:11
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