diff --git a/cmd/helm-operator/main.go b/cmd/helm-operator/main.go index f4912c42a4..88182fc55c 100644 --- a/cmd/helm-operator/main.go +++ b/cmd/helm-operator/main.go @@ -117,9 +117,6 @@ func main() { logger = log.With(logger, "caller", log.DefaultCaller) } - // error channel - errc := make(chan error) - // shutdown triggers shutdown := make(chan struct{}) shutdownWg := &sync.WaitGroup{} @@ -128,11 +125,7 @@ func main() { go func() { c := make(chan os.Signal, 1) signal.Notify(c, syscall.SIGINT, syscall.SIGTERM) - errc <- fmt.Errorf("%s", <-c) - }() - - go func() { - logger.Log("exiting...", <-errc) + logger.Log("exiting...", fmt.Errorf("%s", <-c)) close(shutdown) shutdownWg.Wait() }()