diff --git a/packer/rpc/server.go b/packer/rpc/server.go index b3783de85..4ed4cb25e 100644 --- a/packer/rpc/server.go +++ b/packer/rpc/server.go @@ -46,16 +46,16 @@ func (s *Server) Start() error { } // Start accepting connections - go func() { + go func(l net.Listener) { for { - conn, err := s.listener.Accept() + conn, err := l.Accept() if err != nil { break } go s.server.ServeConn(conn) } - }() + }(s.listener) return nil }