From 67e4eb9ff268842b705ecf5c13de93361ac8d674 Mon Sep 17 00:00:00 2001 From: Erica Z Date: Wed, 6 Nov 2024 12:48:52 +0100 Subject: [PATCH] dont die in this case --- src/subsonic.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/subsonic.rs b/src/subsonic.rs index 5126302..ac2056c 100644 --- a/src/subsonic.rs +++ b/src/subsonic.rs @@ -176,10 +176,13 @@ impl Client { } } - sender - .send(perform(future.await).await) - .await - .expect("could not send cover art bytes back to the main loop"); + if let Err(async_channel::SendError(_)) = sender.send(perform(future.await).await).await + { + event!( + Level::INFO, + "could not send cover art bytes to main loop (task cancelled?)" + ); + } }); receiver