mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-22 17:48:09 +00:00
A channel initialization that died between the early metadata write and stream manager creation left immortal 'initializing' metadata: no owner lock, no URL, no TTL. Every future play request attached to the dead session and got 'Error: Connection stalled'; failover was never tried; the orphan sweep never reaped it because it only checked whether the owner *worker* heartbeat was alive, not whether any worker actually held the channel ownership lock. The M3U profile connection slot also leaked (#947). - Detect ghost sessions (pre-active state, no ownership lock, past the init grace period) on play requests and reinitialize instead of attaching; check_if_channel_exists() now cleans them up too. - Mark failed initializations as 'error' (terminal) instead of leaving 'initializing' behind, and give early init metadata a TTL so any missed failure path expires on its own. - Extend the 30s orphan sweep to reap pre-active channels with no ownership lock and no clients after 2x the init grace period, even when the owning worker is still alive. - Cleaning a ghost releases the leaked M3U profile connection slot. Fixes the ghost-session variant of #669/#695 and the init-failure slot leak of #947. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_alternate_stream_order.py | ||
| test_failover_retry_window.py | ||
| test_ghost_session_cleanup.py | ||
| test_live_db_cleanup.py | ||
| test_proxy_settings.py | ||
| test_stream_ts_client_registration.py | ||
| test_vlc_failover.py | ||