diff --git a/engine/src/player/controller.rs b/engine/src/player/controller.rs index 10a4a846..67b8ac4a 100644 --- a/engine/src/player/controller.rs +++ b/engine/src/player/controller.rs @@ -140,13 +140,6 @@ impl ChannelManager { let timer = Instant::now(); if let Err(e) = run_channel(self_clone.clone()).await { - trace!( - "Runtime has {} active tasks", - tokio::runtime::Handle::current() - .metrics() - .num_alive_tasks() - ); - if let Err(e) = self_clone.stop_all(false).await { error!(target: Target::all(), channel = channel_id; "Failed to stop channel {channel_id}: {e}"); break; @@ -168,6 +161,13 @@ impl ChannelManager { error!(target: Target::all(), channel = channel_id; "Run channel {channel_id} failed: {e} | {retry_msg}"); + trace!( + "Runtime has {} active tasks", + tokio::runtime::Handle::current() + .metrics() + .num_alive_tasks() + ); + sleep(retry_delay).await; } } diff --git a/engine/src/player/output/mod.rs b/engine/src/player/output/mod.rs index c5a0818c..16fd719c 100644 --- a/engine/src/player/output/mod.rs +++ b/engine/src/player/output/mod.rs @@ -241,7 +241,13 @@ pub async fn player(manager: ChannelManager) -> Result<(), ServiceError> { result??; } - result = async { if let Some(f) = handle_ingest { f.await? } else { Ok(()) } }, if handle_ingest.is_some() => { + result = async { + if let Some(f) = handle_ingest { + f.await? + } else { + Ok(()) + } + }, if handle_ingest.is_some() => { result?; }