mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Merge pull request #1451 from mangerlahn/bugfix/cleanup-downloder-on-cancel
#1449 Fix ongoing download after the update has been cancelled
This commit is contained in:
3 files changed
+10
No files matched your search
@@ -111,6 +111,11 @@ static NSString *SUDownloadingReason = @"Downloading update related file";
|
||||
}
|
||||
}
|
||||
|
||||
- (void)cancelDownload
|
||||
{
|
||||
[self cleanup];
|
||||
}
|
||||
|
||||
- (void)cleanup
|
||||
{
|
||||
[self enableAutomaticTermination];
|
||||
|
||||
@@ -19,6 +19,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (void)startTemporaryDownloadWithRequest:(SPUURLRequest *)request;
|
||||
|
||||
// Cancels any ongoing download
|
||||
- (void)cancelDownload;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Vendored
+2
@@ -131,6 +131,8 @@
|
||||
self.connection = nil;
|
||||
}
|
||||
self.downloadName = nil;
|
||||
|
||||
[self.downloader cancelDownload];
|
||||
self.downloader = nil;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user