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

Client ID sometimes assigned after ConnectionState is set to Connected #123

Open
Shii2 opened this issue Sep 30, 2021 · 0 comments
Open

Comments

@Shii2
Copy link

Shii2 commented Sep 30, 2021

Quick Description

Client ID sometimes assigned after ConnectionState is set to Connected that in rare cases can cause getting wrong ID.

Explanation

DarkRift should assign client ID before setting ConnectionState to Connected to prevent this issue.

For example if I connecting to server using ConnectInBackground method and somewhere in code I have coroutine waiting for connection like this:
while (_unityClient.ConnectionState != ConnectionState.Connected) yield return null;
In rare case if I try to get _unityClient.ID right after while loop ID might be wrong (still 0, not assigned)

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

1 participant