don't hold write lock in cffi (this blocked events)

This commit is contained in:
Simon Laux
2023-12-12 03:08:41 +01:00
committed by bjoern
parent 8e073b9c3e
commit f493d6bb40

View File

@@ -4910,7 +4910,7 @@ pub unsafe extern "C" fn dc_accounts_background_fetch_with_timeout(
let accounts = &*accounts;
block_on(async move {
let accounts = accounts.write().await;
let accounts = accounts.read().await;
match accounts
.background_fetch_with_timeout(Duration::from_secs(timeout_in_seconds))
.await