Skip to content

Commit

Permalink
fix: Correct lease_keeper.keep_alive waiting value
Browse files Browse the repository at this point in the history
  • Loading branch information
jopemachine committed May 13, 2024
1 parent 9d4cfd7 commit c9ba513
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lock_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl EtcdLockManager {
.map_err(PyClientError)?;

loop {
sleep(Duration::from_secs((ttl / 10) as u64)).await;
sleep(Duration::from_secs_f64((ttl as f64) / 10.0)).await;
lease_keeper.keep_alive().await.map_err(PyClientError)?;
}
}));
Expand Down

0 comments on commit c9ba513

Please sign in to comment.