MKSG-MugunthKumar / MKNetworkKit

Modern NSURLSession based Networking Framework with built in authentication and HTTP 1.1 caching standards support for iOS 8+ devices
http://mk.sg/8w
3.06k stars 755 forks source link

Download stream errors not handled #406

Open firesteps opened 10 years ago

firesteps commented 10 years ago

In MKNetworkOperation.m

- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
//...
  [stream write:&dataBuffer[0] maxLength:[data length]];

return -1 if error occurs. Error occurs for example when file downloading in background (applicationDidEnterBackground:).