[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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user