Consider this scenario: we are invoking a request,
client.send_request::<MyRequest>(params).await?;
but the future that awaits it is getting cancelled and therefore the receiving end of the channel is getting dropped. Currently this would cause a panic with the "receiver already dropped" message. I believe it's coming from here:
tx.send(r).expect("receiver already dropped");
This is quite common situation and it feels like this code should not panic. Can the send error be safely ignored instead?
Consider this scenario: we are invoking a request,
but the future that awaits it is getting cancelled and therefore the receiving end of the channel is getting dropped. Currently this would cause a panic with the "receiver already dropped" message. I believe it's coming from here:
This is quite common situation and it feels like this code should not panic. Can the
send
error be safely ignored instead?