Merge pull request #1600 from famedly/krille/better-syncloop-error

fix: catch correct exception type for connection problems
This commit is contained in:
Nicolas Werner 2023-11-17 00:07:45 +01:00 committed by GitHub
commit b06167b8a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -19,6 +19,7 @@
import 'dart:async';
import 'dart:convert';
import 'dart:core';
import 'dart:io';
import 'dart:math';
import 'dart:typed_data';
@ -1752,8 +1753,8 @@ class Client extends MatrixApi {
Logs().w('The user has been logged out!');
await clear();
}
} on MatrixConnectionException catch (e, s) {
Logs().w('Synchronization connection failed');
} on IOException catch (e, s) {
Logs().w('Syncloop failed: Client has not connection to the server');
onSyncStatus.add(SyncStatusUpdate(SyncStatus.error,
error: SdkError(exception: e, stackTrace: s)));
} catch (e, s) {