fix: synchronize token refresh to mitigate race condition
synchronized{} is used to mitigate race conditions between multiple threads of Account Manager trying to refresh the token simultaneously by BearerAuthInterceptor and also Notes app (via InputStreamBinder) in OidcTokenRefresher.
If there's a valid authState available, it'll be used. Otherwise, a new access token will be requested.
The fix is based on upstream's implementation. https://github.com/bitfireAT/davx5-ose/pull/1547
Loading
Please register or sign in to comment