fix: break infinite feedback loop in renderer state reports

The server echoes every RNDR_SRVR_STATE_UPDATED as a SET_STATE command
with only next_track updated (playing_state=null, current_track=null).
send_renderer_reports was replying to these echo SET_STATE commands
with another state report, creating an infinite loop that generated
47k log lines (8.2MB) in seconds and completely blocked playback.

Fix: only send state reports for substantive SET_STATE commands that
carry playing_state or current_track changes. Echo commands (next_track
only) are silently consumed.

Also demote diagnostic logging from info to debug to reduce terminal
noise during normal operation.
This commit is contained in:
vicrodh committed 2026-02-22 15:58:56 -06:00
1 parent 6206a98428
commit f6506cd4ea
3 files changed
+45 -36

No files matched your search

+1 -1
View File
@@ -432,7 +432,7 @@ fn map_renderer_report(report: &RendererReport) -> Result<QConnectMessage, Proto
value: Some(value),
});
log::info!(
log::debug!(
"[QConnect/Proto] Encoding StateUpdated: playing={:?} pos={:?} dur={:?} qid={:?} next_qid={:?} qv={}.{}",
playing_state, current_position, duration,
current_qid, next_qid,