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

Clarify what Disconnected status of null means on different platforms #595

Open
eddieSullivan opened this issue Nov 14, 2023 · 1 comment

Comments

@eddieSullivan
Copy link

Looking at the documentation for State.Disconnected, it briefly describes the status field and says "Always null for Javascript target." However I see it as null sometimes on Android as well, and it's not clear what that means.

I do see one place in the code where it goes to null. I would argue that Unknown would be a better option here, since it indicates we don't know why it disconnected. I can reproduce that consistently by just unplugging the device the phone is connected to.

@twyatt
Copy link
Member

twyatt commented Nov 14, 2023

Ya, Unknown is more explicit than null for representing that we don't have a connection state yet.
Will try to find some time soon to drop null as a potential state (and update the documentation accordingly).

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

No branches or pull requests

2 participants