Invalidate the timer before dispatching error delegate callbacks

This commit is contained in:
Blake Watters
2012-01-24 20:45:17 -05:00
parent 1a4bd9b4e8
commit 98cb113abf

View File

@@ -199,9 +199,9 @@ extern NSString* cacheURLKey;
}
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
_failureError = [error retain];
[_request didFailLoadWithError:_failureError];
_failureError = [error retain];
[_request invalidateTimeoutTimer];
[_request didFailLoadWithError:_failureError];
}
- (NSInputStream *)connection:(NSURLConnection *)connection needNewBodyStream:(NSURLRequest *)request {