fix: subscribe before evicting

This commit is contained in:
Joonas Koivunen
2023-08-29 10:48:55 +03:00
parent 9f7688b1d2
commit c659d0f218

View File

@@ -485,10 +485,10 @@ impl LayerInner {
assert!(self.have_remote_client);
self.wanted_evicted.store(true, Ordering::Release);
let mut rx = self.status.subscribe();
self.wanted_evicted.store(true, Ordering::Release);
if self.get().is_none() {
// it was not evictable in the first place
// our store to the wanted_evicted does not matter; it will be reset by next download