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...");
let mut stream = socket.raw_updates().await;
while let Some(Ok(update)) = stream.next().await {
match update {
SocketUpdate::Update(updates) => {
for update in updates {
println!("Got update: {:?}", update);
loop {
match stream.next().await.unwrap() {
Ok(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;
}
}
}