mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-10 07:10:36 +08:00
error handling tweaks
This commit is contained in:
@@ -60,17 +60,19 @@ failCallback:(void (^)(NSError *err))failCallback {
|
||||
|
||||
if (bytesLeft) {
|
||||
self.failCallback([self.outputFileStream streamError]);
|
||||
[self.outputFileStream close];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)connection:(NSURLConnection*)connection didFailWithError:(NSError*)error
|
||||
{
|
||||
self.failCallback(error);
|
||||
[self.outputFileStream close];
|
||||
}
|
||||
|
||||
-(void)connectionDidFinishLoading:(NSURLConnection *)connection {
|
||||
[self.outputFileStream close];
|
||||
self.doneCallback();
|
||||
[self.outputFileStream close];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user