Skip to content

Commit

Permalink
Update lease example
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Dec 17, 2024
1 parent 920527e commit 6074e1d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/lease.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,10 @@ async fn main() -> Result<(), Error> {
// revoke a lease
let _resp = client.lease_revoke(id).await?;
println!("revoke a lease with id {:?}", id);

// keep alive a revoked lease returns error
if let Err(err) = client.lease_keep_alive(id).await {
println!("lease {:?} keep alive error: {:?}", id, err);
}
Ok(())
}

0 comments on commit 6074e1d

Please sign in to comment.