AzureAD / azure-activedirectory-library-for-js

The code for ADAL.js and ADAL Angular has been moved to the MSAL.js repo. Please open any issues or PRs at the link below.
https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/maintenance/adal-angular
Apache License 2.0
627 stars 374 forks source link

Reduce the likelihood of ADAL being stuck #914

Closed Gang-Peng closed 4 years ago

Gang-Peng commented 4 years ago

Why: After our previous change (https://github.com/AzureAD/azure-activedirectory-library-for-js/commit/6a09d3731f4edc7f20169995e169f8baeefc6c58), we see less ADAL stuck errors. However, this ADAl stuck error still happens from time to time. And this PR is to further reduce the likelihood of this error.

How: Move the code cleanning up "self._activeRenewals[resource]" before we trigger callbacks when loading frame times out, so we guarantee that "self._activeRenewals[resource]" will be cleaned up for sure, and won't be interrupted by issues happening during triggering callbacks.