From d20afef3705b40f968e2cd49d61f7fa61b8e585b Mon Sep 17 00:00:00 2001 From: James Magahern Date: Tue, 9 Sep 2025 13:36:35 -0700 Subject: [PATCH] kpcli: updates: print error on error --- core/kpcli/src/client/mod.rs | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/core/kpcli/src/client/mod.rs b/core/kpcli/src/client/mod.rs index 679e795..bce27c5 100644 --- a/core/kpcli/src/client/mod.rs +++ b/core/kpcli/src/client/mod.rs @@ -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; } } }