From f493d6bb40d6e4f126c0d3831016a9604ada0d8e Mon Sep 17 00:00:00 2001 From: Simon Laux Date: Tue, 12 Dec 2023 03:08:41 +0100 Subject: [PATCH] don't hold write lock in cffi (this blocked events) --- deltachat-ffi/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deltachat-ffi/src/lib.rs b/deltachat-ffi/src/lib.rs index 3793ab546..3cb1a7fb1 100644 --- a/deltachat-ffi/src/lib.rs +++ b/deltachat-ffi/src/lib.rs @@ -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