From d76c1c21600e229581a82bf058ae4730a0f192d5 Mon Sep 17 00:00:00 2001 From: Thong Nguyen Date: Mon, 18 Nov 2013 16:01:41 +0000 Subject: [PATCH] Fix AutoRecoveringHttpDataSource raising even with wrong source ref --- .../Classes/AudioPlayer/AutoRecoveringHttpDataSource.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Audjustable/Classes/AudioPlayer/AutoRecoveringHttpDataSource.m b/Audjustable/Classes/AudioPlayer/AutoRecoveringHttpDataSource.m index fc89580..0b15d55 100644 --- a/Audjustable/Classes/AudioPlayer/AutoRecoveringHttpDataSource.m +++ b/Audjustable/Classes/AudioPlayer/AutoRecoveringHttpDataSource.m @@ -190,7 +190,7 @@ static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReach if (!(self.innerDataSource.httpStatusCode >= 200 && self.innerDataSource.httpStatusCode <= 299) && reconnectAttempts >= MAX_ATTEMPTS_WITH_SERVER_ERROR) { - [self.delegate dataSourceErrorOccured:self]; + [super dataSourceErrorOccured:self]; } else if (reconnectAttempts > MAX_IMMEDIATE_RECONNECT_ATTEMPTS) { @@ -211,26 +211,26 @@ static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReach return; } - [self.delegate dataSourceEof:dataSource]; + [self.delegate dataSourceEof:self]; } -(void) dataSourceErrorOccured:(DataSource*)dataSource { if (self.innerDataSource.httpStatusCode == 416 /* Range out of bounds */) { - [self.delegate dataSourceEof:dataSource]; + [super dataSourceEof:dataSource]; } else { [self processRetryOnError]; } - + } -(NSString*) description { return [NSString stringWithFormat:@"Auto-recovering HTTP data source with file length: %lld and position: %lld", self.length, self.position]; - + } @end