#1449 Fix ongoing download after the update has been cancelled

This commit is contained in:
Max Langer committed 2019-08-07 23:43:46 +02:00
1 parent 3f978e865d
commit f42aac7797
3 files changed
+10

No files matched your search

+5
View File
@@ -111,6 +111,11 @@ static NSString *SUDownloadingReason = @"Downloading update related file";
}
}
- (void)cancelDownload
{
[self cleanup];
}
- (void)cleanup
{
[self enableAutomaticTermination];
+3
View File
@@ -19,6 +19,9 @@ NS_ASSUME_NONNULL_BEGIN
- (void)startTemporaryDownloadWithRequest:(SPUURLRequest *)request;
// Cancels any ongoing download
- (void)cancelDownload;
@end
NS_ASSUME_NONNULL_END
+2
View File
@@ -131,6 +131,8 @@
self.connection = nil;
}
self.downloadName = nil;
[self.downloader cancelDownload];
self.downloader = nil;
}