mirror of
https://github.com/saltbo/zpan.git
synced 2026-08-30 17:50:07 +08:00
9afa8f1bb6
reportRemoteDownloadUnit short-circuited on a locally-cached 'blocked' usage record and threw without re-contacting the cloud. Once a unit was blocked, the task was wedged in 'suspended' permanently — recharging credits had no effect, because the next charge attempt never re-asked the cloud (confirmed on prod: the stuck task's unit 1 was status='blocked'). Drop the short-circuit so a previously-blocked unit re-syncs with the cloud on the next attempt; if credits are now available it's accepted and the task leaves suspended. A 'reported' (already-charged) unit still short-circuits, so no double-charge. Test: a unit blocked on first attempt is accepted on retry after a top-up, and the task transitions back to downloading.