Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: properly stop token refresh #210

Merged
merged 1 commit into from
Sep 13, 2024
Merged

fix: properly stop token refresh #210

merged 1 commit into from
Sep 13, 2024

Conversation

kalinkrustev
Copy link
Contributor

@kalinkrustev kalinkrustev commented Sep 12, 2024

This is a fix for a situation where the WSO2Auth.stop() method is called while the HTTP request is started but not yet finished. In this case it will restart the refresh cycle after the HTTP request is finished. This is unwanted behavior and additionally the stop() method is likely to be called in the case of "destroying" the WSO2Auth object, i.e. removing any external references to it, but the re-activated refresh will keep another reference within the timer, thus creating both a memory leak and rogue loop of endlessly refreshing the token, which is not used anywhere.

Copy link

@kalinkrustev kalinkrustev merged commit d1aef53 into master Sep 13, 2024
10 checks passed
@kalinkrustev kalinkrustev deleted the fix/stop-refresh branch September 13, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants