Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ceddral
fahrradwurstmond
Commits
4905eab6
Commit
4905eab6
authored
Sep 24, 2021
by
ceddral
Browse files
gamelobby: call lobby.Update with lock
Update iterates the player map -> needs lock
parent
66567be2
Changes
1
Hide whitespace changes
Inline
Side-by-side
gamelobby.go
View file @
4905eab6
...
...
@@ -50,9 +50,9 @@ func (gl *GameLobby) Register(glp *Player) {
}
gl
.
players
[
glp
.
name
]
=
p
gl
.
playerOrder
=
append
(
gl
.
playerOrder
,
p
.
name
)
gl
.
Unlock
()
go
gl
.
Loop
(
p
)
gl
.
Update
()
gl
.
Unlock
()
}
func
(
gl
*
GameLobby
)
Unregister
(
name
string
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment