Skip to content

Commit

Permalink
fix: clear local database on logout even if server timesout
Browse files Browse the repository at this point in the history
  • Loading branch information
td-famedly committed Nov 13, 2023
1 parent 327f95d commit bf9a24d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/src/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -553,10 +553,9 @@ class Client extends MatrixApi {
/// including all persistent data from the store.
@override
Future<void> logout() async {
// Upload keys to make sure all are cached on the next login.
await encryption?.keyManager.uploadInboundGroupSessions();

try {
// Upload keys to make sure all are cached on the next login.
await encryption?.keyManager.uploadInboundGroupSessions();
await super.logout();
} catch (e, s) {
Logs().e('Logout failed', e, s);
Expand Down

0 comments on commit bf9a24d

Please sign in to comment.