Noita-Together / noita-together

Play alone together
MIT License
52 stars 17 forks source link

Hitting the sort names button can cause the app to freeze sometimes #177

Closed SkyeOfBreeze closed 3 months ago

SkyeOfBreeze commented 6 months ago

Please feel free to comment if you have the issues as well. This seems to not always happen

SkyeOfBreeze commented 4 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

myndzi commented 4 months ago

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...

SkyeOfBreeze commented 3 months ago

Fixed in 0.11.0