Resume the XPC connections after setting up invalidation handlers

This commit is contained in:
Zorg committed 2016-08-20 19:07:10 -04:00
1 parent 47f08be1a0
commit e27c5437ab
2 files changed
+6 -4

No files matched your search

+2 -2
View File
@@ -82,8 +82,6 @@
- (void)downloadUpdate
{
[self.connection resume];
NSString *bundleIdentifier = self.host.bundle.bundleIdentifier;
assert(bundleIdentifier != nil);
@@ -116,6 +114,8 @@
});
};
[self.connection resume];
[self.delegate downloadDriverWillBeginDownload];
NSString *desiredFilename = [NSString stringWithFormat:@"%@ %@", [self.host name], [self.updateItem versionString]];
+4 -2
View File
@@ -317,7 +317,6 @@
} else {
launcherConnection = [[NSXPCConnection alloc] initWithServiceName:@INSTALLER_LAUNCHER_BUNDLE_ID];
launcherConnection.remoteObjectInterface = [NSXPCInterface interfaceWithProtocol:@protocol(SUInstallerLauncherProtocol)];
[launcherConnection resume];
launcherConnection.interruptionHandler = ^{
dispatch_async(dispatch_get_main_queue(), ^{
@@ -347,6 +346,8 @@
});
};
[launcherConnection resume];
installerLauncher = launcherConnection.remoteObjectProxy;
}
@@ -373,7 +374,6 @@
} else {
launcherConnection = [[NSXPCConnection alloc] initWithServiceName:@INSTALLER_LAUNCHER_BUNDLE_ID];
launcherConnection.remoteObjectInterface = [NSXPCInterface interfaceWithProtocol:@protocol(SUInstallerLauncherProtocol)];
[launcherConnection resume];
launcherConnection.interruptionHandler = ^{
dispatch_async(dispatch_get_main_queue(), ^{
@@ -405,6 +405,8 @@
});
};
[launcherConnection resume];
installerLauncher = launcherConnection.remoteObjectProxy;
}