Permalink
Browse files

Invalidate the RKRequest timer in RKResponse when the NSURLConnection…

… begins receiving data.
  • Loading branch information...
1 parent 8946f4d commit 8051fbd9ab67efc8a6b02e3a25606fcb4d4f0051 @bmorton bmorton committed with blakewatters Jan 5, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 Code/Network/RKResponse.m
@@ -180,6 +180,7 @@ - (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectio
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
[_body appendData:data];
+ [_request invalidateTimeoutTimer];
if ([[_request delegate] respondsToSelector:@selector(request:didReceivedData:totalBytesReceived:totalBytesExectedToReceive:)]) {
[[_request delegate] request:_request didReceivedData:[data length] totalBytesReceived:[_body length] totalBytesExectedToReceive:_httpURLResponse.expectedContentLength];
}

0 comments on commit 8051fbd

Please sign in to comment.