mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-03 21:21:32 +00:00
krata: rework xenstore watch for reliability
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user