Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 31c9317

Browse files
committed
error handling tweaks
1 parent 9ad030d commit 31c9317

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CodePushDownloadHandler.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,19 @@ -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
6060

6161
if (bytesLeft) {
6262
self.failCallback([self.outputFileStream streamError]);
63+
[self.outputFileStream close];
6364
}
6465
}
6566

6667
- (void)connection:(NSURLConnection*)connection didFailWithError:(NSError*)error
6768
{
6869
self.failCallback(error);
70+
[self.outputFileStream close];
6971
}
7072

7173
-(void)connectionDidFinishLoading:(NSURLConnection *)connection {
72-
[self.outputFileStream close];
7374
self.doneCallback();
75+
[self.outputFileStream close];
7476
}
7577

7678
@end

0 commit comments

Comments
 (0)