flyctl
flyctl copied to clipboard
token refresh improvements
Two changes to improve token-refresh behavior in the client:
- First try a
Tokens.updatewithout theUserURLCallbackoption (which can now fetch tokens in parallel), and then retry with the UserURLCallback option only if the first attempt returned any errors. - Adjust the (now-configurable)
advancePruneduration (from the default 1 minute) so the foreground thread has an advance-prune duration of 30 seconds while the background thread has 2 minutes. This should make it more likely for tokens to be refreshed in the background rather than delay foreground operations.