fix(instance): release locks explicitly across all instance operations

This commit is contained in:
objz committed 2026-10-02 00:38:10 +02:00
1 parent 3479a05e63
commit 7cbfe9cd0d
4 files changed
+31 -14

No files matched your search

+2 -10
View File
@@ -14,7 +14,7 @@ const MANIFEST_VERSION: u32 = 1;
pub(crate) struct ContentLock {
file: File,
instance_lock: Option<File>,
_instance_lock: Option<crate::instance::runtime::InstanceLock>,
path: PathBuf,
}
@@ -69,7 +69,7 @@ impl ContentLock {
}
Ok(Self {
file,
instance_lock,
_instance_lock: instance_lock,
path: path.to_owned(),
})
}
@@ -105,14 +105,6 @@ impl Drop for ContentLock {
self.path.display()
);
}
if let Some(file) = &self.instance_lock
&& let Err(error) = file.unlock()
{
tracing::warn!(
"Could not release instance lock for '{}': {error}",
self.path.display()
);
}
}
}