mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-28 21:05:49 +08:00
Merge pull request #1685 from lyd123qw2008/fix/auth-auto-refresh-interval
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.
|
||||
// Only one loop is kept alive; starting a new one cancels the previous run.
|
||||
func (m *Manager) StartAutoRefresh(parent context.Context, interval time.Duration) {
|
||||
if interval <= 0 || interval > refreshCheckInterval {
|
||||
interval = refreshCheckInterval
|
||||
} else {
|
||||
if interval <= 0 {
|
||||
interval = refreshCheckInterval
|
||||
}
|
||||
if m.refreshCancel != nil {
|
||||
|
||||
Reference in New Issue
Block a user