mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-28 16:04:54 +08:00
fix(auth): respect configured auto-refresh interval
This commit is contained in:
@@ -1828,9 +1828,7 @@ func (m *Manager) persist(ctx context.Context, auth *Auth) error {
|
|||||||
// every few seconds and triggers refresh operations when required.
|
// every few seconds and triggers refresh operations when required.
|
||||||
// Only one loop is kept alive; starting a new one cancels the previous run.
|
// Only one loop is kept alive; starting a new one cancels the previous run.
|
||||||
func (m *Manager) StartAutoRefresh(parent context.Context, interval time.Duration) {
|
func (m *Manager) StartAutoRefresh(parent context.Context, interval time.Duration) {
|
||||||
if interval <= 0 || interval > refreshCheckInterval {
|
if interval <= 0 {
|
||||||
interval = refreshCheckInterval
|
|
||||||
} else {
|
|
||||||
interval = refreshCheckInterval
|
interval = refreshCheckInterval
|
||||||
}
|
}
|
||||||
if m.refreshCancel != nil {
|
if m.refreshCancel != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user