wait for hello before cancelling context
This commit is contained in:
parent
ec2480f48c
commit
8f285a599f
@ -206,8 +206,8 @@ func (s *Server) joinAndServe(p person) {
|
||||
}
|
||||
}()
|
||||
id, chall, deal := s.l.Queue(ctx, p.id)
|
||||
stop()
|
||||
<-ch
|
||||
stop()
|
||||
if id == (lobby.GameID{}) {
|
||||
// Context canceled.
|
||||
p.conn.Close(websocket.StatusTryAgainLater, "sorry, queue is empty...")
|
||||
|
Loading…
x
Reference in New Issue
Block a user