Change task completion notification so that it blocks until NNW has completed suspending. Fixes #3200
This commit is contained in:
parent
0719e5883b
commit
f22239db36
@ -410,13 +410,13 @@ 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()
|
||||||
}
|
|
||||||
os_log("Accounts refresh processing terminated for running too long.", log: self.log, type: .info)
|
|
||||||
task?.setTaskCompleted(success: false)
|
task?.setTaskCompleted(success: false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user