kpcli: updates: print error on error
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user