Merge pull request #1600 from famedly/krille/better-syncloop-error
fix: catch correct exception type for connection problems
This commit is contained in:
commit
b06167b8a4
|
|
@ -19,6 +19,7 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:core';
|
import 'dart:core';
|
||||||
|
import 'dart:io';
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
|
|
||||||
|
|
@ -1752,8 +1753,8 @@ class Client extends MatrixApi {
|
||||||
Logs().w('The user has been logged out!');
|
Logs().w('The user has been logged out!');
|
||||||
await clear();
|
await clear();
|
||||||
}
|
}
|
||||||
} on MatrixConnectionException catch (e, s) {
|
} on IOException catch (e, s) {
|
||||||
Logs().w('Synchronization connection failed');
|
Logs().w('Syncloop failed: Client has not connection to the server');
|
||||||
onSyncStatus.add(SyncStatusUpdate(SyncStatus.error,
|
onSyncStatus.add(SyncStatusUpdate(SyncStatus.error,
|
||||||
error: SdkError(exception: e, stackTrace: s)));
|
error: SdkError(exception: e, stackTrace: s)));
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue