Merge pull request #1159 from stephanecopin/errorCodeFailedURLs

Add handling for additional error codes that shouldn't be considered a permanent failure
This commit is contained in:
Konstantinos K. 2015-06-24 19:12:09 +03:00
commit 2ee4bfe24b
1 changed files with 3 additions and 1 deletions

View File

@ -192,7 +192,9 @@
} }
}); });
if (error.code != NSURLErrorNotConnectedToInternet && error.code != NSURLErrorCancelled && error.code != NSURLErrorTimedOut) { 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) {
@synchronized (self.failedURLs) { @synchronized (self.failedURLs) {
[self.failedURLs addObject:url]; [self.failedURLs addObject:url];
} }