From c2de4fc6d435d96cdc27eb86ac8eb182f34b4d88 Mon Sep 17 00:00:00 2001 From: messense Date: Tue, 17 Dec 2024 19:36:20 +0800 Subject: [PATCH] Update lease example --- examples/lease.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/lease.rs b/examples/lease.rs index 2290a1c..6b4ecfc 100644 --- a/examples/lease.rs +++ b/examples/lease.rs @@ -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!("revoked lease {:?} keep alive error: {:?}", id, err); + } Ok(()) }