Skip to content

Commit 051b489

Browse files
alallemaMubelotix
andauthored
Update src/client.rs Fix is_healthy method
Co-authored-by: Mubelotix <[email protected]>
1 parent 988aae7 commit 051b489

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/client.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,11 @@ impl<'a> Client<'a> {
207207
/// # });
208208
/// ```
209209
pub async fn is_healthy(&self) -> bool {
210-
self.health().await.is_ok()
210+
if let Some(health) = self.health().await {
211+
health.status.as_str() == "available"
212+
} else {
213+
false
214+
}
211215
}
212216

213217
/// Get the private and public key.

0 commit comments

Comments
 (0)