use the correct error channel (#2164)

This commit is contained in:
Elvin Efendi 2018-03-03 07:23:06 -05:00 committed by Manuel Alejandro de Brito Fontes
parent 038804b22b
commit 38b35c292e

View file

@ -284,7 +284,6 @@ func (n *NGINXController) Start() {
go n.syncStatus.Run() go n.syncStatus.Run()
} }
done := make(chan error, 1)
cmd := exec.Command(n.binary, "-c", cfgPath) cmd := exec.Command(n.binary, "-c", cfgPath)
// put nginx in another process group to prevent it // put nginx in another process group to prevent it
@ -307,7 +306,7 @@ func (n *NGINXController) Start() {
for { for {
select { select {
case err := <-done: case err := <-n.ngxErrCh:
if n.isShuttingDown { if n.isShuttingDown {
break break
} }