mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-08 19:21:32 -07:00
fix(anime): cap outcome polling and upstream stalls by wall clock
- watchPlaybackOutcome now tracks a real deadline so slow property reads eat the timeout budget instead of extending it, and a zero probe interval still terminates - stream strip proxy aborts upstream GETs that go silent for 15s instead of hanging mpv on that segment forever - anime browser runtime drops a stream proxy that finishes starting after its bridge already died, instead of leaking a listener pointed at nothing
This commit is contained in:
@@ -228,10 +228,15 @@ export function createAnimeBrowserRuntime(deps: AnimeBrowserRuntimeDeps) {
|
||||
});
|
||||
|
||||
try {
|
||||
stripProxy = await startStreamStripProxy({
|
||||
const proxy = await startStreamStripProxy({
|
||||
upstreamOrigin: () => sidecar?.baseUrl ?? handle.baseUrl,
|
||||
log: deps.log,
|
||||
});
|
||||
// The bridge can die while the proxy is coming up, in which case onExit
|
||||
// already ran and cleared `stripProxy`; adopting this one would leak a
|
||||
// listening server pointed at a dead upstream.
|
||||
if (sidecar === handle) stripProxy = proxy;
|
||||
else void proxy.close();
|
||||
} catch (error) {
|
||||
// Playback still works for undisguised streams; log and carry on.
|
||||
deps.log(`[anime-browser] stream proxy failed to start: ${describeError(error)}`);
|
||||
|
||||
Reference in New Issue
Block a user