fix(auth): respect configured auto-refresh interval

This commit is contained in:
lyd123qw2008
2026-02-23 22:07:50 +08:00
parent 713388dd7b
commit 450d1227bd

View File

@@ -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 {