Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Fix problems with ASIWebPageRequest and maxConcurrentOperationCount #253

pokeb opened this Issue · 3 comments

3 participants


There is a temporary fix for the problem that works for me. The problem is,upon request timeout ASIWebpageRequest never calls super class(ASIHttpRequest) method markAsFinished which makes the timed out request to remain in the queue.

I made the changes to ASIWebPageRequest.m

1.In markAsFinished method

  • (void)markAsFinished { if (error) { [super markAsFinished]; }


Added the [super markAsFinished] call in case of an error.

  1. In externalResourceFetchFailed method

  • (void)externalResourceFetchFailed:(ASIHTTPRequest *)externalResourceRequest { if([[self externalResourceQueue] shouldCancelAllRequestsOnFailure]){ [self failWithError:[externalResourceRequest error]]; } }

After making these changes i was able to download the webpage eventhough there are few timeouts and failures.
Note: Need to add the line [[self externalResourceQueue] setShouldCancelAllRequestsOnFailure:NO]; to the methods parseAsHTML and parseAsCSS as mentioned in the bug.

@pokeb pokeb closed this issue from a commit
@pokeb ASIWebPageRequest: Fix from @RadhikaS that:
* Ensures external resource requests are properly removed from the queue and released when they fail
* Changes behaviour so that by default, external resource request failures do not cause everything else to fail

Also added new shouldIgnoreExternalResourceErrors property to control this

closes gh-253
@pokeb pokeb closed this in f7fe5c7

Thanks @RadhikaS - I have incorporated your fix! :)


Hi Ben,

I think there is unfortunately an issue with your implementation.

"should ignore errors" is not the same as "should cancel"

[[self externalResourceQueue] setShouldCancelAllRequestsOnFailure:[self shouldIgnoreExternalResourceErrors]];

I think you are missing a " ! " in this line.

Thank you and
Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.