Left Drop handle funlock
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user