fix(player): Treat HTTP 460 as a refused connection #18

Merged
namillis merged 1 commit from fix/refused-460 into main 2026-10-19 04:30:35 +00:00
Owner

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:

Where Before After
Live channel from the pool Error shown at once, no failover Retried with why=refused, so the pool moves to another source
Catch-up "The provider answered with an error (HTTP 460)" Two quiet retries, then "The provider refused the stream. Its connections may be busy."

The comments that listed the refused codes by number in ExoPlayerEngine.kt, PlaybackErrors.kt, PoolSignals.kt and ProviderConfig.kt now name 460 or point at RefusedCodes.

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. RefusedCodesTest and PlaybackErrorsTest now include 460.
  • lintDebug: 0 errors, 11 warnings (unchanged).
  • assembleDebug: OK.
  • Emulator, debug build, playing from the pool: BBC Two catch-up got 460 three times (the first try and two quiet retries), then showed the refused message.
  • Not checked on the emulator: the live failover. The pool never picked Happy8K for a live stream during testing, so that path is covered by the unit tests only.

Screenshots

I'll add this in a comment: the refused message on BBC Two catch-up.

## 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: | Where | Before | After | |---|---|---| | Live channel from the pool | Error shown at once, no failover | Retried with `why=refused`, so the pool moves to another source | | Catch-up | "The provider answered with an error (HTTP 460)" | Two quiet retries, then "The provider refused the stream. Its connections may be busy." | The comments that listed the refused codes by number in `ExoPlayerEngine.kt`, `PlaybackErrors.kt`, `PoolSignals.kt` and `ProviderConfig.kt` now name 460 or point at `RefusedCodes`. 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. `RefusedCodesTest` and `PlaybackErrorsTest` now include 460. - `lintDebug`: 0 errors, 11 warnings (unchanged). - `assembleDebug`: OK. - Emulator, debug build, playing from the pool: BBC Two catch-up got 460 three times (the first try and two quiet retries), then showed the refused message. - Not checked on the emulator: the live failover. The pool never picked Happy8K for a live stream during testing, so that path is covered by the unit tests only. ## Screenshots I'll add this in a comment: the refused message on BBC Two catch-up.
fix(player): Treat HTTP 460 as a refused connection
All checks were successful
CI / test (pull_request) Successful in 5m27s
0cd5c25671
Happy8K answers 460 when its login is at its connection limit (its
account showed 1 of 1 connections in use the whole time). It answers
460 for live streams and catch-up alike. The player didn't count 460
as a refusal, so it went straight to "The provider answered with an
error (HTTP 460)" without its quiet retries, and on a live channel the
pool was never told to move to another source.

460 is now one of the refused codes, beside 456. A live 460 is retried
with `why=refused`, so the pool fails over. A catch-up 460 is retried
quietly and then shows the refused message, which says the provider's
connections may be busy.
Author
Owner

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:

  • Making catch-up play while Happy8K is full. The pool sends each channel's catch-up to one provider, so that needs a change in the pool.
  • Changing the retry count, the retry delay, or any other refused code.
  • The scrub bar losing focus when time-shift renews its window. That gets its own PR.
**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:** - Making catch-up play while Happy8K is full. The pool sends each channel's catch-up to one provider, so that needs a change in the pool. - Changing the retry count, the retry delay, or any other refused code. - The scrub bar losing focus when time-shift renews its window. That gets its own PR.
namillis deleted branch fix/refused-460 2026-10-19 04:30:35 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
namillis/LiveWireTV!18
No description provided.