Skip to content

Commit

Permalink
Remove unnecessary condition
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-karpenko committed Aug 24, 2024
1 parent 3077026 commit 9f3b3bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ impl LeaseManager {
// Sleep some random time (up to 1000ms) to minimize collision probability
tokio::time::sleep(random_duration(MIN_RELEASE_WAITING_MILLIS, MAX_RELEASE_WAITING_MILLIS)).await;
res
} else if self.is_locked().await && !self.is_expired().await {
} else if self.is_locked().await {
// It's locked by someone else and the lock is actual.
// Sleep up to the expiration time of the lock.
let holder = self.holder().await.unwrap();
Expand Down

0 comments on commit 9f3b3bf

Please sign in to comment.