Skip to content

Player creation should be handled synchronously

Observed in a multiplayer a few weeks ago: errors would be fired because of multiple BanchoLobbyPlayer objects created for the same lobby and actual player. The reason was: there were 2 events fired rapidly about a player unknown before, the second one being fired before the first player object was created from their nickname (thus making it async).

Solution: make creation of player objects synchronous.
I have a working patch, but it needs optimization and shit ton of testing.