diff --git a/StreamingKit/StreamingKit/STKAutoRecoveringHTTPDataSource.m b/StreamingKit/StreamingKit/STKAutoRecoveringHTTPDataSource.m index 8dfe3a8..bed7527 100644 --- a/StreamingKit/StreamingKit/STKAutoRecoveringHTTPDataSource.m +++ b/StreamingKit/StreamingKit/STKAutoRecoveringHTTPDataSource.m @@ -371,16 +371,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]; } }