STKAutoRecoveringHTTPDataSource http error handling fix

This commit is contained in:
Anton 2016-09-22 16:10:04 +03:00
parent a84db95be6
commit a3d8b06975
1 changed files with 6 additions and 7 deletions

View File

@ -369,16 +369,15 @@ static void PopulateOptionsWithDefault(STKAutoRecoveringHTTPDataSourceOptions* o
[self.delegate dataSourceEof:self];
}
-(void) dataSourceErrorOccured:(STKDataSource*)dataSource
{
- (void)dataSourceErrorOccured:(STKDataSource*)dataSource {
NSLog(@"dataSourceErrorOccured");
if (self.innerDataSource.httpStatusCode == 416 /* Range out of bounds */)
{
/* Range out of bounds */
if (self.innerDataSource.httpStatusCode == 416) {
[super dataSourceEof:dataSource];
}
else
{
} else if ([self hasGotNetworkConnection]) {
[super dataSourceErrorOccured:dataSource];
} else {
[self processRetryOnError];
}
}