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; } } }