fix(player): Treat HTTP 460 as a refused connection #18
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/refused-460"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What's wrong
Catch-up on BBC Two, and on other channels whose archive the pool sends to the provider Happy8K, failed with "The provider answered with an error (HTTP 460)". The pool is the IPTV server that combines several providers' streams for each channel. Catch-up plays a programme that already aired, from the provider's archive.
Happy8K's login allows one connection, and its account showed that connection in use the whole time, even with nothing of ours playing. While the login is full, Happy8K answers 460 to every request, live or catch-up. So 460 means the same as 456, which other providers send when their login is full.
The player didn't count 460 as a refusal. A refusal gets two quiet retries before any error shows, and on a live channel each retry tells the pool to move to another source. A 460 got neither: the player showed the generic HTTP error straight away.
What changed
460 is now one of the refused codes in
core/player/RefusedCodes.kt, beside 401, 403, 429 and 456. That gives it the same handling as 456:why=refused, so the pool moves to another sourceThe comments that listed the refused codes by number in
ExoPlayerEngine.kt,PlaybackErrors.kt,PoolSignals.ktandProviderConfig.ktnow name 460 or point atRefusedCodes.Not a goal: making catch-up play while Happy8K is full. The pool sends each channel's catch-up to a single provider and doesn't fail over, so those programmes still won't play until a connection frees up. That needs a change in the pool.
Checks
testDebugUnitTest: 526 pass.RefusedCodesTestandPlaybackErrorsTestnow include 460.lintDebug: 0 errors, 11 warnings (unchanged).assembleDebug: OK.Screenshots
I'll add this in a comment: the refused message on BBC Two catch-up.
Intent: a provider that answers HTTP 460 because its login is full gets the same handling as 456. The player retries quietly, a live channel fails over to another source in the pool, and the error says the provider's connections may be busy.
Not a goal: