mirror of
https://github.com/chatmail/core.git
synced 2026-04-02 05:22:14 +03:00
fix: lock the database when INSERTing a webxdc update
`query_row_optional` does not hold the write lock and may fail with "database is locked" error or cause the other task such as SMTP loop to fail.
This commit is contained in:
@@ -409,6 +409,7 @@ impl Context {
|
||||
instance_id: &MsgId,
|
||||
status_update_item: &StatusUpdateItem,
|
||||
) -> Result<Option<StatusUpdateSerial>> {
|
||||
let _lock = self.sql.write_lock().await;
|
||||
let uid = status_update_item.uid.as_deref();
|
||||
let Some(rowid) = self
|
||||
.sql
|
||||
|
||||
Reference in New Issue
Block a user