diff options
| author | hozan23 <hozan23@karyontech.net> | 2024-06-14 22:49:53 +0200 | 
|---|---|---|
| committer | hozan23 <hozan23@karyontech.net> | 2024-06-14 22:49:53 +0200 | 
| commit | 3429caa87699d986f799a11f6e0f4526e723b655 (patch) | |
| tree | e548c356fca4eb76742e29d4bab05007468ed14b /jsonrpc/examples/pubsub_client.rs | |
| parent | 0c0699c0460c1b149915729223eec701bde481df (diff) | |
jsonrpc: client use unbounded channels as buffer for sending requests & clean up examples
Diffstat (limited to 'jsonrpc/examples/pubsub_client.rs')
| -rw-r--r-- | jsonrpc/examples/pubsub_client.rs | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/jsonrpc/examples/pubsub_client.rs b/jsonrpc/examples/pubsub_client.rs index 830b32f..73570b8 100644 --- a/jsonrpc/examples/pubsub_client.rs +++ b/jsonrpc/examples/pubsub_client.rs @@ -1,5 +1,6 @@  use std::time::Duration; +use log::info;  use serde::{Deserialize, Serialize};  use smol::Timer; @@ -25,7 +26,8 @@ async fn run_client() {      smol::spawn(async move {          loop { -            let _m = sub.recv().await.unwrap(); +            let m = sub.recv().await.expect("Receive new log msg"); +            info!("Receive new log {m}");          }      })      .detach();  | 
