Private
Public Access
1
0

kpcli: updates: print error on error

This commit is contained in:
2025-09-09 13:36:35 -07:00
parent 357be5cdf4
commit d20afef370

View File

@@ -143,15 +143,25 @@ impl ClientCli {
println!("Listening for raw updates..."); println!("Listening for raw updates...");
let mut stream = socket.raw_updates().await; let mut stream = socket.raw_updates().await;
while let Some(Ok(update)) = stream.next().await {
match update { loop {
SocketUpdate::Update(updates) => { match stream.next().await.unwrap() {
for update in updates { Ok(update) => {
println!("Got update: {:?}", update); match update {
SocketUpdate::Update(updates) => {
for update in updates {
println!("Got update: {:?}", update);
}
}
SocketUpdate::Pong => {
println!("Pong");
}
} }
} },
SocketUpdate::Pong => {
println!("Pong"); Err(e) => {
println!("Update error: {:?}", e);
break;
} }
} }
} }