kpcli: updates: print error on error
This commit is contained in:
@@ -143,7 +143,10 @@ 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 {
|
|
||||||
|
loop {
|
||||||
|
match stream.next().await.unwrap() {
|
||||||
|
Ok(update) => {
|
||||||
match update {
|
match update {
|
||||||
SocketUpdate::Update(updates) => {
|
SocketUpdate::Update(updates) => {
|
||||||
for update in updates {
|
for update in updates {
|
||||||
@@ -154,6 +157,13 @@ impl ClientCli {
|
|||||||
println!("Pong");
|
println!("Pong");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
Err(e) => {
|
||||||
|
println!("Update error: {:?}", e);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
Reference in New Issue
Block a user