aboutsummaryrefslogtreecommitdiff
path: root/jsonrpc/examples/pubsub_client.rs
diff options
context:
space:
mode:
authorhozan23 <hozan23@karyontech.net>2024-06-22 15:53:22 +0200
committerhozan23 <hozan23@karyontech.net>2024-06-22 15:53:22 +0200
commiteed5fdb54cc261756c828d9c6bd1114e16ec6aa8 (patch)
tree703e0b31b2d84b9df3eb917e3b2dbf29fb7b0049 /jsonrpc/examples/pubsub_client.rs
parent6c793e7ed3f3736e2169976f11e304f288ca6813 (diff)
jsonrpc/client: close the subscription channel when calling unsubscribe
Diffstat (limited to 'jsonrpc/examples/pubsub_client.rs')
-rw-r--r--jsonrpc/examples/pubsub_client.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/jsonrpc/examples/pubsub_client.rs b/jsonrpc/examples/pubsub_client.rs
index bbfd9b4..823089d 100644
--- a/jsonrpc/examples/pubsub_client.rs
+++ b/jsonrpc/examples/pubsub_client.rs
@@ -16,7 +16,6 @@ async fn run_client() {
.await
.expect("Build a client");
- let clientc = client.clone();
smol::spawn(async move {}).detach();
let sub = client
@@ -34,7 +33,7 @@ async fn run_client() {
loop {
Timer::after(Duration::from_millis(500)).await;
- let _: Pong = clientc
+ let _: Pong = client
.call("Calc.ping", ())
.await
.expect("Send ping request");