Skip to content

Commit

Permalink
fix: err
Browse files Browse the repository at this point in the history
  • Loading branch information
rymnc committed Oct 14, 2024
1 parent 5a51e0c commit 8079739
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/services/p2p/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ where
}
_ = tokio::time::sleep_until(self.next_cache_reset_time) => {
should_continue = true;
let mut view = self.cached_view.lock().expect("Cached view lock poisoned");
let mut view = self.cached_view.lock().map_err(|e| anyhow!("Failed to lock cached view: {:?}", e))?;
// we could just call .clear() on the internal hashmaps
let latest_view = self.view_provider.latest_view()?;
*view = CachedView::new(latest_view);
Expand Down

0 comments on commit 8079739

Please sign in to comment.