fix(pool): Re-check pool_info a minute after a timeout #29
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/pool-info-retry"
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?
Problem
LiveWire asks the provider
player_api.php?action=pool_infoto 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.poolFeaturesnow says whether the answer timed out (PoolCheck.timedOut) instead of returning the same empty set a plain panel gives.ProviderRepository.poolFeaturestreats 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.Not a goal
No change to the 3-second limit, to how the features are parsed, or to M3U providers.
Testing
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),lintDebugandassembleDebugpass, each run on its own.