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:
Zorg committed 2021-05-01 11:08:18 -07:00
1 parent e179443799
commit af245bfe62
1 file changed
+3
+3
View File
@@ -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;