fix(backend): fix crash when trying to update player data concurrently

This commit is contained in:
2025-03-11 12:32:36 +01:00
parent d4f194b146
commit a4a26f04d4
4 changed files with 31 additions and 0 deletions

View File

@ -87,6 +87,7 @@ func JoinRoom(room *types.Room, requestedUsername string) *types.Player {
Connection: types.WebsocketConnection{
IsConnected: false,
},
Mutex: &sync.Mutex{},
}
player.ResetInactivity()
room.AppendPlayer(player)