Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
svyatonik committed Oct 28, 2020
1 parent 8e7fe82 commit 1597b09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1597b09

Please sign in to comment.