Timeout the run loop to get a final return value after two seconds. Fixes #3276
This commit is contained in:
parent
530051386f
commit
a6f5c67f9d
|
@ -328,7 +328,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
||||||
}
|
}
|
||||||
|
|
||||||
let timeout = Date().addingTimeInterval(2)
|
let timeout = Date().addingTimeInterval(2)
|
||||||
while !isShutDownSyncDone && RunLoop.current.run(mode: .default, before: .distantFuture) && timeout > Date() { }
|
while !isShutDownSyncDone && RunLoop.current.run(mode: .default, before: timeout) && timeout > Date() { }
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: Notifications
|
// MARK: Notifications
|
||||||
|
|
Loading…
Reference in New Issue