remove sync that no longer happens oops

This commit is contained in:
Branden J Brown 2024-02-04 09:52:14 -06:00
parent 658634c0db
commit fb6f99e7b0
2 changed files with 1 additions and 7 deletions

View File

@ -58,10 +58,6 @@ func gameActor(ctx context.Context, g *game.Match, dealer, chall person, join <-
// definitely expired. // definitely expired.
ctx, stop := context.WithTimeoutCause(ctx, 4*time.Hour, errMatchExpired) ctx, stop := context.WithTimeoutCause(ctx, 4*time.Hour, errMatchExpired)
defer stop() defer stop()
// Accept joins from the dealer and challenger. We don't care which is
// which, but we need to get both to synchronize the socket.
<-join
<-join
var obs []observer var obs []observer
actions := make(chan action, 2) actions := make(chan action, 2)
go playerActor(ctx, dealer, actions) go playerActor(ctx, dealer, actions)

View File

@ -195,11 +195,9 @@ func (s *Server) joinAndServe(p person) {
return return
} }
if deal { if deal {
ch := make(chan person, 2)
g := game.New(p.id, chall.id) g := game.New(p.id, chall.id)
<-chall.sync <-chall.sync
go gameActor(context.TODO(), g, p, chall.person, ch) go gameActor(context.TODO(), g, p, chall.person, nil)
ch <- p
} }
// Reply with the game ID so they can share. // Reply with the game ID so they can share.
r := serve.GameStart{ r := serve.GameStart{