diff --git a/core/lib.rs b/core/lib.rs
index b04595609..b99ea4036 100644
--- a/core/lib.rs
+++ b/core/lib.rs
@@ -521,7 +521,7 @@ impl Database {
encryption_key: RefCell::new(None),
encryption_cipher_mode: Cell::new(None),
sync_mode: Cell::new(SyncMode::Full),
- data_sync_retry: Cell::new(false),
+ data_sync_retry: AtomicBool::new(false),
busy_timeout: Cell::new(Duration::new(0, 0)),
});
self.n_connections
@@ -1017,7 +1017,7 @@ pub struct Connection {
encryption_key: RefCell