From ea4913e0281411bc8ea301f26db3b4e9fbf5a22c Mon Sep 17 00:00:00 2001 From: "Ericson \"Fogo\" Soares" Date: Fri, 24 Nov 2023 13:31:45 -0300 Subject: [PATCH] Concurrency crash for ephemeral thumbs (#1821) Solve --- core/src/object/media/thumbnail/process.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/object/media/thumbnail/process.rs b/core/src/object/media/thumbnail/process.rs index 9f58e9326..0d18091d4 100644 --- a/core/src/object/media/thumbnail/process.rs +++ b/core/src/object/media/thumbnail/process.rs @@ -187,9 +187,12 @@ pub(super) async fn batch_processor( // the same capacity as the batch size, so there is always a space // in the queue if let Some(cas_ids_tx) = maybe_cas_ids_tx { - cas_ids_tx + if cas_ids_tx .send_blocking(OsString::from(format!("{}.webp", cas_id))) - .expect("channel never closes"); + .is_err() + { + warn!("No one to listen to generated ephemeral thumbnail cas id"); + } } }) })