aboutsummaryrefslogtreecommitdiff
path: root/src/recv.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-07-25 10:58:55 +0200
committerAlex Auvolat <alex@adnab.me>2022-07-25 10:58:55 +0200
commitfed0542313824df295a7e322a9aebe8ba62f97b9 (patch)
treeeba724bb57fe182e15df5608990b00c445347dc6 /src/recv.rs
parentab80ade4f0034cbdcf15a99c674730f85eb06870 (diff)
downloadnetapp-fed0542313824df295a7e322a9aebe8ba62f97b9.tar.gz
netapp-fed0542313824df295a7e322a9aebe8ba62f97b9.zip
Remove blocking_send that crashes
Diffstat (limited to 'src/recv.rs')
-rw-r--r--src/recv.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/recv.rs b/src/recv.rs
index 2be8728..e748f18 100644
--- a/src/recv.rs
+++ b/src/recv.rs
@@ -35,7 +35,9 @@ impl Sender {
impl Drop for Sender {
fn drop(&mut self) {
if let Some(inner) = self.inner.take() {
- let _ = inner.blocking_send(Err(255));
+ tokio::spawn(async move {
+ let _ = inner.send(Err(255)).await;
+ });
}
}
}