[fix](trx-client): start decode collector before audio replay

Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-06 16:01:31 +01:00
parent f9c0fa6981
commit e3378d5f49
+9
View File
@@ -328,6 +328,15 @@ async fn async_init() -> DynResult<AppState> {
let frontend_runtime_ctx = Arc::new(frontend_runtime);
// Start decode history collector before audio client starts replay.
// Frontend tasks are spawned asynchronously, so starting the collector
// here avoids missing the initial server-side history burst.
if cfg.frontends.audio.enabled {
trx_frontend_http::server::audio::start_decode_history_collector(
frontend_runtime_ctx.clone(),
);
}
// Spawn frontends with runtime context
for frontend in &frontends {
let frontend_state_rx = state_rx.clone();