-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
When token has expired, postConsent tries to fetch a new token. If that fetching fails, postConsent is not resolved/completed at all. It only handles case .success(_). This results the app waiting indefinitely for the function to resolve. This can be reproduce by disabling internet connection when using the SDK.
ios-release/Sources/MobileConsentsSDK/Networking/Manager/NetworkManager.swift (link)
func postConsent(_ consent: Consent, completion: @escaping (Error?) -> Void) {
if let token = token, token.expiresIn > Date() {
postConsent(consent: consent, completion: completion)
} else {
authorize { repsponse in
if case .success(_) = repsponse {
self.postConsent(consent, completion: completion)
}
}
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels