mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-04-17 13:23:06 +10:00
The usage API itself has rate limits. A 429 from it means "poll less frequently", not that the account exceeded its usage quota. Previously incrementPollFailures() was called, marking the credential unusable and interrupting in-flight connections. Now: parse Retry-After, store as usageAPIRetryDelay, and retry after that delay. The credential stays usable and relies on passive header updates for usage data in the meantime.