fix(pool): Re-check pool_info a minute after a timeout #29

Merged
namillis merged 1 commit from fix/pool-info-retry into main 2026-11-05 17:21:18 +00:00
Owner

Problem

LiveWire asks the provider player_api.php?action=pool_info to find out whether it is the pool, and which extras it supports (Sources, retry markers, stop, Live Now game info). The check has a 3-second limit, so a slow panel doesn't hold up the first play.

When the check hit that limit, the app treated the provider as a plain panel and remembered that for the whole app run. Sources and game info then stayed off until the app was restarted. This happened twice on Nov 2.

Fix

  • XtreamClient.poolFeatures now says whether the answer timed out (PoolCheck.timedOut) instead of returning the same empty set a plain panel gives.
  • ProviderRepository.poolFeatures treats a timed-out provider as plain for 60 seconds (POOL_RECHECK_MS), then checks again. During that minute a slow panel still isn't asked on every play.
  • A real answer, pool or plain, is still kept for the app run. A network failure is still not cached, as before.

Not a goal

No change to the 3-second limit, to how the features are parsed, or to M3U providers.

Testing

  • New PoolFeaturesCacheTest: a timed-out check stays plain within the minute without asking again, then returns the pool's features after it; a real answer is not re-fetched a day later.
  • testDebugUnitTest (565 tests), lintDebug and assembleDebug pass, each run on its own.
  • No UI change, so no screenshots.
## Problem LiveWire asks the provider `player_api.php?action=pool_info` to find out whether it is the pool, and which extras it supports (Sources, retry markers, stop, Live Now game info). The check has a 3-second limit, so a slow panel doesn't hold up the first play. When the check hit that limit, the app treated the provider as a plain panel and remembered that for the whole app run. Sources and game info then stayed off until the app was restarted. This happened twice on Nov 2. ## Fix - `XtreamClient.poolFeatures` now says whether the answer timed out (`PoolCheck.timedOut`) instead of returning the same empty set a plain panel gives. - `ProviderRepository.poolFeatures` treats a timed-out provider as plain for 60 seconds (`POOL_RECHECK_MS`), then checks again. During that minute a slow panel still isn't asked on every play. - A real answer, pool or plain, is still kept for the app run. A network failure is still not cached, as before. ## Not a goal No change to the 3-second limit, to how the features are parsed, or to M3U providers. ## Testing - New `PoolFeaturesCacheTest`: a timed-out check stays plain within the minute without asking again, then returns the pool's features after it; a real answer is not re-fetched a day later. - `testDebugUnitTest` (565 tests), `lintDebug` and `assembleDebug` pass, each run on its own. - No UI change, so no screenshots.
fix(pool): Re-check pool_info a minute after a timeout
All checks were successful
CI / test (pull_request) Successful in 5m44s
7dce486865
A pool_info check that timed out was cached as a plain panel for the
whole app run, so Sources and Live Now game info stayed off until the
app was restarted. A timeout now counts as plain for 60s and is then
checked again. Real answers are still kept for the app run.
namillis deleted branch fix/pool-info-retry 2026-11-05 17:21:18 +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!29
No description provided.