From fed0542313824df295a7e322a9aebe8ba62f97b9 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 25 Jul 2022 10:58:55 +0200 Subject: [PATCH] Remove blocking_send that crashes --- src/recv.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; + }); } } }