maybe don't respond twice
This commit is contained in:
parent
86883cff71
commit
38c21448cc
1
api.go
1
api.go
@ -32,6 +32,7 @@ func (a *API) NewGame(res http.ResponseWriter, req *http.Request) {
|
|||||||
initDummy(g.simulator)
|
initDummy(g.simulator)
|
||||||
}
|
}
|
||||||
respondWithJSON(res, http.StatusOK, newGameResp{i, "red"})
|
respondWithJSON(res, http.StatusOK, newGameResp{i, "red"})
|
||||||
|
return
|
||||||
}
|
}
|
||||||
if !g.bluePlayer.Ready {
|
if !g.bluePlayer.Ready {
|
||||||
g.bluePlayer.Ready = true
|
g.bluePlayer.Ready = true
|
||||||
|
Loading…
Reference in New Issue
Block a user