From 1597b09c4a9140cd0f1320948c7a8fb237af58fb Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky Date: Wed, 28 Oct 2020 09:52:12 +0300 Subject: [PATCH] fix https://github.com/paritytech/jsonrpsee/issues/143 --- src/client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.rs b/src/client.rs index 2c99daf4ec..25c8c009ee 100644 --- a/src/client.rs +++ b/src/client.rs @@ -385,7 +385,7 @@ where Either::Right(Ok(RawClientEvent::SubscriptionNotif { request_id, result })) => { // TODO: unsubscribe if channel is closed let (notifs_tx, _) = active_subscriptions.get_mut(&request_id).unwrap(); - if notifs_tx.send(result).await.is_err() { + if let Some(Err(_)) = notifs_tx.send(result).now_or_never() { let (_, unsubscribe) = active_subscriptions.remove(&request_id).unwrap(); client .subscription_by_id(request_id)