Merge pull request #2666 from zhongwuzw/revert_domain_filter

Revert "Filter the error domain with NSURLErrorDomain before checking the URL Error Codes
This commit is contained in:
Kinarobin 2019-04-02 16:26:10 +08:00 committed by GitHub
commit 48c1b0586e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 13 deletions

View File

@ -209,8 +209,6 @@
if ([self.delegate respondsToSelector:@selector(imageManager:shouldBlockFailedURL:withError:)]) {
shouldBlockFailedURL = [self.delegate imageManager:self shouldBlockFailedURL:url withError:error];
} else {
// Filter the error domain and check error codes
if ([error.domain isEqualToString:NSURLErrorDomain]) {
shouldBlockFailedURL = ( error.code != NSURLErrorNotConnectedToInternet
&& error.code != NSURLErrorCancelled
&& error.code != NSURLErrorTimedOut
@ -219,9 +217,6 @@
&& error.code != NSURLErrorCannotFindHost
&& error.code != NSURLErrorCannotConnectToHost
&& error.code != NSURLErrorNetworkConnectionLost);
} else {
shouldBlockFailedURL = NO;
}
}
if (shouldBlockFailedURL) {