Merge branch 'master' of https://github.com/SDWebImage/SDWebImage into 5.x
# Conflicts: # SDWebImage/SDWebImageManager.m
This commit is contained in:
commit
2e7338894e
|
@ -374,14 +374,19 @@ static id<SDImageLoader> _defaultImageLoader;
|
|||
if ([self.delegate respondsToSelector:@selector(imageManager:shouldBlockFailedURL:withError:)]) {
|
||||
shouldBlockFailedURL = [self.delegate imageManager:self shouldBlockFailedURL:url withError:error];
|
||||
} else {
|
||||
shouldBlockFailedURL = ( error.code != NSURLErrorNotConnectedToInternet
|
||||
&& error.code != NSURLErrorCancelled
|
||||
&& error.code != NSURLErrorTimedOut
|
||||
&& error.code != NSURLErrorInternationalRoamingOff
|
||||
&& error.code != NSURLErrorDataNotAllowed
|
||||
&& error.code != NSURLErrorCannotFindHost
|
||||
&& error.code != NSURLErrorCannotConnectToHost
|
||||
&& error.code != NSURLErrorNetworkConnectionLost);
|
||||
// Filter the error domain and check error codes
|
||||
if ([error.domain isEqualToString:NSURLErrorDomain]) {
|
||||
shouldBlockFailedURL = ( error.code != NSURLErrorNotConnectedToInternet
|
||||
&& error.code != NSURLErrorCancelled
|
||||
&& error.code != NSURLErrorTimedOut
|
||||
&& error.code != NSURLErrorInternationalRoamingOff
|
||||
&& error.code != NSURLErrorDataNotAllowed
|
||||
&& error.code != NSURLErrorCannotFindHost
|
||||
&& error.code != NSURLErrorCannotConnectToHost
|
||||
&& error.code != NSURLErrorNetworkConnectionLost);
|
||||
} else {
|
||||
shouldBlockFailedURL = NO;
|
||||
}
|
||||
}
|
||||
|
||||
return shouldBlockFailedURL;
|
||||
|
|
Loading…
Reference in New Issue