Skip to content

Commit

Permalink
Fix recovering expired sessions when there's no offline
Browse files Browse the repository at this point in the history
fix #4571
  • Loading branch information
charlag committed Sep 12, 2022
1 parent 4b767be commit 15dfd01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/misc/ErrorHandlerImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export async function reloginForExpiredSession() {
}
// Fetch old credentials to preserve database key if it's there
const oldCredentials = await locator.credentialsProvider.getCredentialsByUserId(userId)
await locator.sqlCipherFacade.closeDb()
await locator.sqlCipherFacade?.closeDb()
await locator.credentialsProvider.deleteByUserId(userId, {deleteOfflineDb: false})
if (sessionType === SessionType.Persistent) {
await locator.credentialsProvider.store({credentials: credentials, databaseKey: oldCredentials?.databaseKey})
Expand Down

0 comments on commit 15dfd01

Please sign in to comment.