fix(commands_v2): write-lock and debug-log v2_queue_consume_stop_after_if
Per code review on commit 97b5bd79:
- consume_stop_after_if mutates inner state on match (clears the
marker), so use write().await for semantic consistency with the
other mutating commands. The inner Mutex made read() work today
but the intent is mutation.
- Demote the per-call log to debug — this fires on every natural
track-end and would spam info-level logs during normal listening.
Refs #356.
cc
This commit is contained in:
1 file changed
+2
-2
@@ -864,9 +864,9 @@ pub async fn v2_queue_consume_stop_after_if(
|
||||
finished_track_id: u64,
|
||||
bridge: State<'_, CoreBridgeState>,
|
||||
) -> Result<bool, RuntimeError> {
|
||||
log::info!("[V2] queue_consume_stop_after_if: {}", finished_track_id);
|
||||
log::debug!("[V2] queue_consume_stop_after_if: {}", finished_track_id);
|
||||
let bridge = bridge.get().await;
|
||||
Ok(bridge.core().queue().read().await.consume_stop_after_if(finished_track_id))
|
||||
Ok(bridge.core().queue().write().await.consume_stop_after_if(finished_track_id))
|
||||
}
|
||||
|
||||
/// Remove all queue tracks at indices > `index`. Returns the count
|
||||
|
||||
Reference in new issue
Block a user