diff --git a/run.go b/run.go index f956ede..f0286a2 100644 --- a/run.go +++ b/run.go @@ -139,8 +139,6 @@ func run() error { // channel used to check whether the app had troubles starting up. started := make(chan error, 1) - defer close(started) - go func(ok chan error) { p := setting.Port() h := setting.Host() @@ -155,6 +153,7 @@ func run() error { defer func() { cancel() started <- err + close(started) }() log.Info("shutting down the server")