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

Name randomization of group. #4

Open
AxiomOfChoices opened this issue Jan 2, 2021 · 3 comments
Open

Name randomization of group. #4

AxiomOfChoices opened this issue Jan 2, 2021 · 3 comments

Comments

@AxiomOfChoices
Copy link

So I've been trying to use this code for my project on the side and the main problem I'm trying to tackle is the admin disconnecting issue mentioned in #2. I've tried to solving this by having each client listen for the 'userleft' event and adding an extra parameter to that event that lest them know if it was the admin that left, after this each client disconnects from the group and attempts to reconnect, my thinking was that which ever client did this first would become the new group admin (as no other client would be connected) and then each other client would connect to it.

And while this does work it introduces a new problem where the new admin keeps its previous name(which is passed to the connect function) but when the other clients attempt to connect to it their names become randomizes regardless of what is passed to their connect function.

image

I have been trying to check for a while what could be causing this and the only thing I narrowed down upon is that this happens if the clients try to connect within a small amount of time of each other(give or take 300ms).
What would be a possible cause of this issue?

@rohanbam
Copy link

rohanbam commented Jul 5, 2023

@AxiomOfChoices, did you ever manage to resolve this issue?

@AxiomOfChoices
Copy link
Author

@rohanbam Nope, but I also didn't understand much about the protocol at the time. It's possible the issue is quite simple and I just didn't see it.

@rohanbam
Copy link

rohanbam commented Jul 5, 2023

Ah ok. Thanks @AxiomOfChoices. I'll see if I can find a way around it. Cheers.

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