Change task completion notification so that it blocks until NNW has completed suspending. Fixes #3200

This commit is contained in:
Maurice Parker 2022-03-01 14:43:54 -06:00
parent 0719e5883b
commit f22239db36

View File

@ -410,11 +410,11 @@ private extension AppDelegate {
// set expiration handler // set expiration handler
task.expirationHandler = { [weak task] in task.expirationHandler = { [weak task] in
os_log("Accounts refresh processing terminated for running too long.", log: self.log, type: .info)
DispatchQueue.main.sync { DispatchQueue.main.sync {
self.suspendApplication() self.suspendApplication()
task?.setTaskCompleted(success: false)
} }
os_log("Accounts refresh processing terminated for running too long.", log: self.log, type: .info)
task?.setTaskCompleted(success: false)
} }
} }