Resolve deadlocks (I'm an idiot)

This commit is contained in:
Lennart
2025-01-15 21:02:53 +01:00
parent d03d394e54
commit e6c09074d3
2 changed files with 4 additions and 3 deletions

View File

@@ -363,6 +363,8 @@ impl AddressbookStore for SqliteAddressbookStore {
.await
.map_err(crate::Error::from)?;
tx.commit().await.map_err(crate::Error::from)?;
// TODO: Watch for errors here?
let _ = self.sender.try_send(CollectionOperation {
r#type: CollectionOperationType::Object,
@@ -374,7 +376,6 @@ impl AddressbookStore for SqliteAddressbookStore {
sync_token: Some(synctoken),
});
tx.commit().await.map_err(crate::Error::from)?;
Ok(())
}

View File

@@ -308,6 +308,8 @@ impl CalendarStore for SqliteCalendarStore {
)
.await?;
tx.commit().await.map_err(crate::Error::from)?;
// TODO: Watch for errors here?
let _ = self.sender.try_send(CollectionOperation {
r#type: CollectionOperationType::Object,
@@ -315,8 +317,6 @@ impl CalendarStore for SqliteCalendarStore {
topic: self.get_calendar(&principal, &cal_id).await?.push_topic,
sync_token: Some(synctoken),
});
tx.commit().await.map_err(crate::Error::from)?;
Ok(())
}