From 423f3a01dd635f3bbaca09ed58f943a10294d9b8 Mon Sep 17 00:00:00 2001 From: Daisuke MAKIUCHI Date: Tue, 28 Apr 2026 19:51:41 +0900 Subject: [PATCH] =?UTF-8?q?=E5=85=A5=E5=AE=A4=E3=81=97=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=A8=E3=81=97=E3=81=9F=E9=83=A8=E5=B1=8B=E3=81=8C=E3=81=A1?= =?UTF-8?q?=E3=82=87=E3=81=86=E3=81=A9=E7=B5=82=E4=BA=86=E3=81=97=E3=81=9F?= =?UTF-8?q?=E3=81=A8=E3=81=8D=E3=81=AB=E5=BE=85=E3=81=A1=E7=B6=9A=E3=81=91?= =?UTF-8?q?=E3=81=A6=E3=81=97=E3=81=BE=E3=81=86=E3=81=AE=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/game/repository.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/game/repository.go b/server/game/repository.go index 54a003f..45c61bf 100644 --- a/server/game/repository.go +++ b/server/game/repository.go @@ -252,6 +252,10 @@ func (repo *Repository) joinRoom(ctx context.Context, id string, client *pb.Clie return nil, WithCode( xerrors.Errorf("context done: room=%v", room.Id), codes.DeadlineExceeded) + case <-room.Done(): + return nil, NormalWithCode( + xerrors.Errorf("room done: room=%v", room.Id), + codes.NotFound) case room.msgCh <- msg: } @@ -261,6 +265,10 @@ func (repo *Repository) joinRoom(ctx context.Context, id string, client *pb.Clie return nil, WithCode( xerrors.Errorf("context done: room=%v", room.Id), codes.DeadlineExceeded) + case <-room.Done(): + return nil, NormalWithCode( + xerrors.Errorf("room done: room=%v", room.Id), + codes.NotFound) case ewc := <-errch: return nil, ewc case joined = <-jch: