Skip to content

Commit

Permalink
Invalidate the timer before dispatching error delegate callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
blakewatters committed Jan 25, 2012
1 parent 1a4bd9b commit 98cb113
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Code/Network/RKResponse.m
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 98cb113

Please sign in to comment.