feat(failedURLs): add additional error codes that shouldn't be considered as a permanent failure
Showing
1 changed file
with
3 additions
and
1 deletions
@@ -192,7 +192,9 @@ | @@ -192,7 +192,9 @@ | ||
192 | } | 192 | } |
193 | }); | 193 | }); |
194 | 194 | ||
195 | - if (error.code != NSURLErrorNotConnectedToInternet && error.code != NSURLErrorCancelled && error.code != NSURLErrorTimedOut) { | 195 | + BOOL shouldBeFailedURLAlliOSVersion = (error.code != NSURLErrorNotConnectedToInternet && error.code != NSURLErrorCancelled && error.code != NSURLErrorTimedOut); |
196 | + BOOL shouldBeFailedURLiOS7 = (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1 && error.code != NSURLErrorInternationalRoamingOff && error.code != NSURLErrorCallIsActive && error.code != NSURLErrorDataNotAllowed); | ||
197 | + if (shouldBeFailedURLAlliOSVersion && (NSFoundationVersionNumber <= NSFoundationVersionNumber_iOS_6_1 || shouldBeFailedURLiOS7)) { | ||
196 | @synchronized (self.failedURLs) { | 198 | @synchronized (self.failedURLs) { |
197 | [self.failedURLs addObject:url]; | 199 | [self.failedURLs addObject:url]; |
198 | } | 200 | } |
-
Please register or login to post a comment