mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-08-01 18:56:03 -04:00
fix eventual consistency
This commit is contained in:
parent
2c3d4dce93
commit
b5612e5dd8
23 changed files with 309 additions and 296 deletions
|
@ -54,9 +54,7 @@ class ContactListCubit extends DHTShortArrayCubit<proto.Contact> {
|
|||
// Add Contact to account's list
|
||||
// if this fails, don't keep retrying, user can try again later
|
||||
await operateWrite((writer) async {
|
||||
if (!await writer.tryAdd(contact.writeToBuffer())) {
|
||||
throw Exception('Failed to add contact record');
|
||||
}
|
||||
await writer.add(contact.writeToBuffer());
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue