Skip to content

Commit

Permalink
fix(base): all EventCacheStoreLock must refer to the same underlyin…
Browse files Browse the repository at this point in the history
…g cross-process lock

And not duplicate it once per `EventCacheStoreLock`.
  • Loading branch information
bnjbvr committed Nov 25, 2024
1 parent edc93e6 commit 2e975d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/matrix-sdk-base/src/event_cache/store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub use self::{
#[derive(Clone)]
pub struct EventCacheStoreLock {
/// The inner cross process lock that is used to lock the `EventCacheStore`.
cross_process_lock: CrossProcessStoreLock<LockableEventCacheStore>,
cross_process_lock: Arc<CrossProcessStoreLock<LockableEventCacheStore>>,

/// The store itself.
///
Expand All @@ -70,11 +70,11 @@ impl EventCacheStoreLock {
let store = store.into_event_cache_store();

Self {
cross_process_lock: CrossProcessStoreLock::new(
cross_process_lock: Arc::new(CrossProcessStoreLock::new(
LockableEventCacheStore(store.clone()),
"default".to_owned(),
holder,
),
)),
store,
}
}
Expand Down

0 comments on commit 2e975d9

Please sign in to comment.