mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-27 16:22:20 +01:00
Preserve completion gating and handle explicit idle stream status safely
This commit is contained in:
+6
-1
@@ -6149,7 +6149,12 @@ import { invalidateSettings } from './appConfig.js';
|
||||
cache: 'no-store',
|
||||
});
|
||||
if (!_getForegroundStreamState() || _backgroundStreams.has(sid)) return;
|
||||
if (res.status !== 404) return;
|
||||
if (res.status !== 404 && !res.ok) return;
|
||||
let _probe = null;
|
||||
try { _probe = await res.json(); } catch (_) { /* An invalid response is not an idle stream. */ }
|
||||
const _noActiveStream = res.status === 404 || (res.ok && _probe &&
|
||||
typeof _probe.status === 'string' && _probe.status !== 'streaming');
|
||||
if (!_noActiveStream) return;
|
||||
|
||||
console.warn('[stream-watchdog] Local stream was stale and server has no active stream. Unlocking composer.');
|
||||
if (active.abortCtrl && !active.abortCtrl.signal.aborted) {
|
||||
|
||||
Reference in New Issue
Block a user