mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 19:44:05 +00:00
Avoid logouts when resetting the caches
The SDK is reporting a `Failed to run migrations: locking protocol` but in practice we tear down the session before using said session to access the `clearCaches` method on its client, which is obviously wrong. This patch removes that step and the delay as everything seems to work properly without them.
This commit is contained in:
@@ -966,11 +966,8 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
|||||||
stopSync(isBackgroundTask: false)
|
stopSync(isBackgroundTask: false)
|
||||||
userSessionFlowCoordinator?.stop()
|
userSessionFlowCoordinator?.stop()
|
||||||
|
|
||||||
tearDownUserSession()
|
|
||||||
|
|
||||||
// Allow for everything to deallocate properly
|
// Allow for everything to deallocate properly
|
||||||
Task {
|
Task {
|
||||||
try? await Task.sleep(for: .seconds(2))
|
|
||||||
await userSession.clientProxy.clearCaches()
|
await userSession.clientProxy.clearCaches()
|
||||||
stateMachine.processEvent(.startWithExistingSession)
|
stateMachine.processEvent(.startWithExistingSession)
|
||||||
hideLoadingIndicator()
|
hideLoadingIndicator()
|
||||||
|
|||||||
Reference in New Issue
Block a user