Closed SkyeOfBreeze closed 3 months ago
Bug occurs when there are duplicates of the same user in the lobby. this can occur by a user leaving and rejoining due to a server bug. @myndzi or I to fix the server, but I will apply a fix to the client as well
I expect that there's probably an edge case with rejoining, such as connecting to the server when an existing (ghost) socket is still present - a "left the room" message not being sent prior to "joined the room".
However, I think the more robust course of action is to make join/leave messages idempotent at the client end - if the client sees a "join" message, it should add or replace the new user into the list. There is some strained logic on the server because of the client's inability to handle messages robustly that could probably be cleaned up with these semantics. I'm minorly of the opinion that we should lean into it rather than "fix" it so that we can reduce complexity rather than add it...
Fixed in 0.11.0
Please feel free to comment if you have the issues as well. This seems to not always happen