Skip to content

Commit

Permalink
PortAllocator.Run() is no longer blocking.
Browse files Browse the repository at this point in the history
We no longer need the goroutine, so cleaning it up.
  • Loading branch information
markmandel authored and jkowalski committed Jan 30, 2019
1 parent 69be283 commit beba965
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkg/gameservers/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,9 @@ func (c *Controller) Run(workers int, stop <-chan struct{}) error {
}

// Run the Port Allocator
go func() {
if err := c.portAllocator.Run(stop); err != nil {
c.logger.WithError(err).Error("error running the port allocator")
}
}()
if err = c.portAllocator.Run(stop); err != nil {
return errors.Wrap(err, "error running the port allocator")
}

// Run the Health Controller
go c.healthController.Run(stop)
Expand Down

0 comments on commit beba965

Please sign in to comment.