mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
don't hold write lock in cffi (this blocked events)
This commit is contained in:
@@ -4910,7 +4910,7 @@ pub unsafe extern "C" fn dc_accounts_background_fetch_with_timeout(
|
|||||||
|
|
||||||
let accounts = &*accounts;
|
let accounts = &*accounts;
|
||||||
block_on(async move {
|
block_on(async move {
|
||||||
let accounts = accounts.write().await;
|
let accounts = accounts.read().await;
|
||||||
match accounts
|
match accounts
|
||||||
.background_fetch_with_timeout(Duration::from_secs(timeout_in_seconds))
|
.background_fetch_with_timeout(Duration::from_secs(timeout_in_seconds))
|
||||||
.await
|
.await
|
||||||
|
|||||||
Reference in New Issue
Block a user