Left Drop handle funlock

This commit is contained in:
Andrej Mihajlov
2026-01-12 18:08:11 +01:00
parent 898b8d6ae5
commit bc6d2fad48
2 changed files with 1 additions and 14 deletions
-6
View File
@@ -178,12 +178,6 @@ While the stored info point to:\n{stored_info:#?}"
source: io::Error,
},
#[error("coundn't unlock the lock at {lock_path} with error code {libc_code}")]
LockFileUnlockFailure {
lock_path: PathBuf,
libc_code: Errno,
},
#[error("could not remove the lock file at {} after performing binary upgrade: {source}", path.display())]
LockFileRemovalFailure {
path: PathBuf,
+1 -8
View File
@@ -59,7 +59,7 @@ pub(crate) async fn perform_upgrade(config: &Config) -> Result<UpgradeResult, Ny
})?;
debug!("attempting to acquire the lock");
let locked_file =
let _locked_file =
Flock::lock(lock_file, FlockArg::LockExclusiveNonblock).map_err(|(_lock_file, err)| {
NymvisorError::UnableToAcquireUpgradePlanLock {
lock_path: lock_path.clone(),
@@ -114,13 +114,6 @@ pub(crate) async fn perform_upgrade(config: &Config) -> Result<UpgradeResult, Ny
source,
})?;
locked_file
.unlock()
.map_err(|(_locked_file, err)| NymvisorError::LockFileUnlockFailure {
lock_path,
libc_code: err,
})?;
Ok(UpgradeResult {
binary_swapped: true,
requires_manual_intervention,