From 5736a8b11c75023544e5d1e78d06609904a08181 Mon Sep 17 00:00:00 2001 From: adz Date: Fri, 30 Aug 2024 12:53:39 +0200 Subject: [PATCH] Silently fail when ready oneshot channel got dropped --- rhio/src/network/actor.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rhio/src/network/actor.rs b/rhio/src/network/actor.rs index 01dba1a1..a9271b08 100644 --- a/rhio/src/network/actor.rs +++ b/rhio/src/network/actor.rs @@ -204,8 +204,7 @@ impl PandaActor { if has_joined { return; } - loop { - let joined_topic = joined_rx.recv().await.expect("channel is not dropped"); + while let Ok(joined_topic) = joined_rx.recv().await { if joined_topic == topic { return; }