mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-26 04:57:54 +00:00
Enforce the updater session is in progress
We should enforce update session is in progress before checking for new updates. I've tested checking for updates regularly, in background, and informational updates. An update check could have been made while the permission request was in flight, which we don't want to happen.
This commit is contained in:
1 parent
e179443799
commit
af245bfe62
1 file changed
+3
Vendored
+3
@@ -423,6 +423,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
|
||||
if (self.sessionInProgress) {
|
||||
SULog(SULogLevelError, @"Error: -checkForUpdatesInBackground called but .sessionInProgress == YES");
|
||||
return;
|
||||
}
|
||||
|
||||
self.sessionInProgress = YES;
|
||||
@@ -488,6 +489,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
|
||||
if (self.sessionInProgress) {
|
||||
SULog(SULogLevelError, @"Error: -checkForUpdates called but .sessionInProgress == YES");
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.driver != nil) {
|
||||
@@ -529,6 +531,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
|
||||
if (self.sessionInProgress) {
|
||||
SULog(SULogLevelError, @"Error: -checkForUpdateInformation called but .sessionInProgress == YES");
|
||||
return;
|
||||
}
|
||||
|
||||
self.sessionInProgress = YES;
|
||||
|
||||
Reference in new issue
Block a user