You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When stream connection fails triggering doDisconnect, the code to set the callback queue runs concurrently with doDisconnect which reads the callback queue.
I believe this can be resolved, by moving the assignment of the callback queue before the connect call (line 173 to 170).
Version
1.13.1
Steps to reproduce the behavior
It's a race condition, so it's hard to reproduce.
Discovered by running Xcode with the Thread Sanitizer enabled.
Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Thanks @aaronbarsky. I can the see potential for the data race here so I've made the change in PR #529. To be honest it makes sense to assign the given queue as early as possible, I'm not sure why it was in that order before.
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better.
Summary
When stream connection fails triggering doDisconnect, the code to set the callback queue runs concurrently with doDisconnect which reads the callback queue.
I believe this can be resolved, by moving the assignment of the callback queue before the connect call (line 173 to 170).
Version
1.13.1
Steps to reproduce the behavior
It's a race condition, so it's hard to reproduce.
Discovered by running Xcode with the Thread Sanitizer enabled.
Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: