Fixed an issue with rapidly going to/from the background

• Fixed an issue where leaving and returning to the app rapidly could leave the app in a state when the database and network are inaccessible
• Fixed an issue where bad nodes might not get dropped from the pool (libSession update)
pull/986/head
Morgan Pretty 10 months ago
parent 185e84dc95
commit ea7b4a2de3

@ -1 +1 @@
Subproject commit fdfd9dbb698e4ce6e6e08dd1b85eec428ab2077e
Subproject commit c9a98dbb2e2ef45aa85075576247d61355269e1c

@ -211,7 +211,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
// Stop all jobs except for message sending and when completed suspend the database
JobRunner.stopAndClearPendingJobs(exceptForVariant: .messageSend, using: dependencies) {
if !self.hasCallOngoing() {
if !self.hasCallOngoing() && Singleton.hasAppContext && Singleton.appContext.isInBackground {
LibSession.suspendNetworkAccess()
Storage.suspendDatabaseAccess()
Log.info("[AppDelegate] completed network and database shutdowns.")

Loading…
Cancel
Save