Remove unnecessary select statement (#692)

* Remove unnecessary select statement

* Remove unnecessary if-statement
pull/707/head
Pontus Leitzler 7 years ago committed by Ben Kochie
parent 1824ac3b9e
commit 0b6763886a

@ -129,14 +129,9 @@ func runCommandAndTests(cmd *exec.Cmd, address string, fn func(pid int) error) e
errc <- fn(pid) errc <- fn(pid)
}(cmd.Process.Pid) }(cmd.Process.Pid)
select { err := <-errc
case err := <-errc:
if cmd.Process != nil { if cmd.Process != nil {
cmd.Process.Kill() cmd.Process.Kill()
} }
if err != nil {
return err return err
} }
}
return nil
}

Loading…
Cancel
Save