krata: rework xenstore watch for reliability

This commit is contained in:
alex committed 2024-03-23 08:46:20 +00:00
1 parent 3d5095c78b
commit 7b2de22320
4 files changed
+64 -35

No files matched your search

+2 -1
View File
@@ -7,7 +7,8 @@ async fn main() -> Result<()> {
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init();
let path = args().nth(1).unwrap_or("/local/domain".to_string());
let client = XsdClient::open().await?;
let mut handle = client.watch(&path).await?;
let mut handle = client.create_watch().await?;
client.bind_watch(&handle, path).await?;
let mut count = 0;
loop {
let Some(event) = handle.receiver.recv().await else {