Permalink
Browse files

Invalidate the timer before dispatching error delegate callbacks

  • Loading branch information...
1 parent 1a4bd9b commit 98cb113abf8147096b0a103308670abe05623f23 @blakewatters blakewatters committed Jan 25, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 Code/Network/RKResponse.m
@@ -199,9 +199,9 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection {
}
- (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 {

0 comments on commit 98cb113

Please sign in to comment.