Skip to content

Commit 4cb59a0

Browse files
authored
Merge pull request #590 from cranberyxl/fix/too-many-timers
[AuthManager] clear token refresh timer
2 parents f699938 + feb8e56 commit 4cb59a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

swift-sdk/Internal/AuthManager.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ class AuthManager: IterableAuthManagerProtocol {
113113

114114
let timeIntervalToRefresh = TimeInterval(expirationDate) - dateProvider.currentDate.timeIntervalSince1970 - expirationRefreshPeriod
115115

116+
clearRefreshTimer()
116117
expirationRefreshTimer = Timer.scheduledTimer(withTimeInterval: timeIntervalToRefresh, repeats: false) { [weak self] _ in
117118
self?.requestNewAuthToken(hasFailedPriorAuth: false)
118119
}

0 commit comments

Comments
 (0)