[feat](trx-client): add diagnostic logging for decode pipeline

Log whether audio/decode is enabled at startup and warn when
/decode is requested but the decode channel was not set. Helps
diagnose broken decode pipelines.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
2026-02-08 22:54:12 +01:00
parent b98475037c
commit dba2f0a9fb
2 changed files with 9 additions and 0 deletions
@@ -98,8 +98,10 @@ pub async fn events(
#[get("/decode")]
pub async fn decode_events() -> Result<HttpResponse, Error> {
let Some(decode_rx) = crate::server::audio::subscribe_decode() else {
tracing::warn!("/decode requested but decode channel not set (audio disabled?)");
return Ok(HttpResponse::NotFound().body("decode not enabled"));
};
tracing::info!("/decode SSE client connected");
let decode_stream = futures_util::stream::unfold(decode_rx, |mut rx| async move {
loop {