Timeout the run loop to get a final return value after two seconds. Fixes #3276

This commit is contained in:
Maurice Parker 2021-09-06 14:52:41 -05:00
parent 530051386f
commit a6f5c67f9d
1 changed files with 1 additions and 1 deletions

View File

@ -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