From fb6f99e7b0368579ffc5d0346971fcb61c0e99c7 Mon Sep 17 00:00:00 2001 From: Branden J Brown Date: Sun, 4 Feb 2024 09:52:14 -0600 Subject: [PATCH] remove sync that no longer happens oops --- game.go | 4 ---- server.go | 4 +--- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/game.go b/game.go index 1e58e24..5cc8666 100644 --- a/game.go +++ b/game.go @@ -58,10 +58,6 @@ func gameActor(ctx context.Context, g *game.Match, dealer, chall person, join <- // definitely expired. ctx, stop := context.WithTimeoutCause(ctx, 4*time.Hour, errMatchExpired) 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 actions := make(chan action, 2) go playerActor(ctx, dealer, actions) diff --git a/server.go b/server.go index 37037e0..7de5429 100644 --- a/server.go +++ b/server.go @@ -195,11 +195,9 @@ func (s *Server) joinAndServe(p person) { return } if deal { - ch := make(chan person, 2) g := game.New(p.id, chall.id) <-chall.sync - go gameActor(context.TODO(), g, p, chall.person, ch) - ch <- p + go gameActor(context.TODO(), g, p, chall.person, nil) } // Reply with the game ID so they can share. r := serve.GameStart{