[x] Code changes are tested (add some information if not applicable)
Description of the pull request
Following the suggestion to create a PR related to this bug issue submitted by @angelolloqui
We are getting several crashes on production from the class AuthorizationMoyaPlugin in GetStream library.
The crash report is:
[...]
It seems the token variable is not correct when setting this value in the request.
I am checking the code and I do not see any wrong thing, except that token is an instance variable that might change and produce a race condition between the if token.isEmpty and the actual usage. Not sure if it helps, but maybe rewriting it to this would protect it: [...]
fix crash due to token race condition in AuthorizationMoyaPlugin
Submit a pull request
CLA
Description of the pull request
Following the suggestion to create a PR related to this bug issue submitted by @angelolloqui