mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 14:50:00 -07:00
Fix stalled audio pipeline cleanup and scanner stop race condition
- Kill audio pipeline when startup produces no data instead of leaving zombie processes running - Skip unnecessary 1s USB release delay when no processes were active - Remove racy fresh=1 pipeline restart from stream endpoint - Await stopScanner() before starting direct listen to prevent race Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -319,7 +319,7 @@ function stopScanner() {
|
||||
? `/controller/agents/${listeningPostCurrentAgent}/listening_post/stop`
|
||||
: '/listening/scanner/stop';
|
||||
|
||||
fetch(endpoint, { method: 'POST' })
|
||||
return fetch(endpoint, { method: 'POST' })
|
||||
.then(() => {
|
||||
if (!isAgentMode && typeof releaseDevice === 'function') releaseDevice('scanner');
|
||||
listeningPostCurrentAgent = null;
|
||||
@@ -2245,7 +2245,7 @@ async function _startDirectListenInternal() {
|
||||
|
||||
try {
|
||||
if (isScannerRunning) {
|
||||
stopScanner();
|
||||
await stopScanner();
|
||||
}
|
||||
|
||||
const freqInput = document.getElementById('radioScanStart');
|
||||
|
||||
Reference in New Issue
Block a user