Merge pull request #1297 from mythodeia/master
cleaner implementation of failedUrl error handling
This commit is contained in:
commit
7e6bd60176
|
@ -192,9 +192,13 @@
|
|||
}
|
||||
});
|
||||
|
||||
BOOL shouldBeFailedURLAlliOSVersion = (error.code != NSURLErrorNotConnectedToInternet && error.code != NSURLErrorCancelled && error.code != NSURLErrorTimedOut);
|
||||
BOOL shouldBeFailedURLiOS7 = (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1 && error.code != NSURLErrorInternationalRoamingOff && error.code != NSURLErrorCallIsActive && error.code != NSURLErrorDataNotAllowed);
|
||||
if (shouldBeFailedURLAlliOSVersion || shouldBeFailedURLiOS7) {
|
||||
if ( error.code != NSURLErrorNotConnectedToInternet
|
||||
&& error.code != NSURLErrorCancelled
|
||||
&& error.code != NSURLErrorTimedOut
|
||||
&& error.code != NSURLErrorInternationalRoamingOff
|
||||
&& error.code != NSURLErrorDataNotAllowed
|
||||
&& error.code != NSURLErrorCannotFindHost
|
||||
&& error.code != NSURLErrorCannotConnectToHost) {
|
||||
@synchronized (self.failedURLs) {
|
||||
[self.failedURLs addObject:url];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue