go: explicitly close chan
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
leo 2023-05-03 04:57:04 +02:00
parent ed14e45969
commit 6937eb7a80
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ

3
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")