From c6b480fa1e0a705253d0a3b82b8dff1df15bf868 Mon Sep 17 00:00:00 2001 From: Stephen McQuay Date: Wed, 4 Sep 2013 23:36:45 -0700 Subject: [PATCH] removed goroutine leak --- game.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/game.go b/game.go index 46587af..0d2f434 100644 --- a/game.go +++ b/game.go @@ -14,7 +14,6 @@ type game struct { splosions map[*bot.Splosion]bool register chan *player unregister chan *player - robot_id chan int turn int width, height float64 spectators map[*Spectator]bool @@ -39,16 +38,7 @@ func NewGame(id string, width, height float64) *game { sunregister: make(chan *Spectator), kill: make(chan bool, 128), } - - g.robot_id = make(chan int) - go func() { - for i := 0; ; i++ { - g.robot_id <- i - } - }() - return g - } func (g *game) run() {