mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-23 12:27:52 +08:00
Invalidate the RKRequest timer in RKResponse when the NSURLConnection begins receiving data.
This commit is contained in:
committed by
Blake Watters
parent
8946f4d702
commit
8051fbd9ab
@@ -180,6 +180,7 @@ extern NSString* cacheURLKey;
|
||||
|
||||
- (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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user