# Conflicts:
#	SDWebImage/SDWebImageManager.m
This commit is contained in:
DreamPiggy 2019-03-31 19:41:17 +08:00
commit 2e7338894e
1 changed files with 13 additions and 8 deletions

View File

@ -374,6 +374,8 @@ static id<SDImageLoader> _defaultImageLoader;
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
@ -382,6 +384,9 @@ static id<SDImageLoader> _defaultImageLoader;
&& error.code != NSURLErrorCannotFindHost
&& error.code != NSURLErrorCannotConnectToHost
&& error.code != NSURLErrorNetworkConnectionLost);
} else {
shouldBlockFailedURL = NO;
}
}
return shouldBlockFailedURL;