Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix(contacts): close service after local reset

laurenspriem82461166a85f
diff --git a/mobile/packages/contacts/lib/src/service/contact_directory.dart b/mobile/packages/contacts/lib/src/service/contact_directory.dart
index 33adf49cad..5af2a1c2d6 100644
--- a/mobile/packages/contacts/lib/src/service/contact_directory.dart
+++ b/mobile/packages/contacts/lib/src/service/contact_directory.dart
@@ -82,7 +82,11 @@ class ContactDirectory {
Future<void> resetLocalState() async {
final service = _active?.service;
_clear(notify: true);
- await service?.resetLocalState();
+ try {
+ await service?.resetLocalState();
+ } finally {
+ await service?.close();
+ }
}
void clearSession({bool notify = true}) => _clear(notify: notify);