go: explicitly close chan
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ed14e45969
commit
6937eb7a80
3
run.go
3
run.go
@ -139,8 +139,6 @@ func run() error {
|
|||||||
// channel used to check whether the app had troubles starting up.
|
// channel used to check whether the app had troubles starting up.
|
||||||
started := make(chan error, 1)
|
started := make(chan error, 1)
|
||||||
|
|
||||||
defer close(started)
|
|
||||||
|
|
||||||
go func(ok chan error) {
|
go func(ok chan error) {
|
||||||
p := setting.Port()
|
p := setting.Port()
|
||||||
h := setting.Host()
|
h := setting.Host()
|
||||||
@ -155,6 +153,7 @@ func run() error {
|
|||||||
defer func() {
|
defer func() {
|
||||||
cancel()
|
cancel()
|
||||||
started <- err
|
started <- err
|
||||||
|
close(started)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
log.Info("shutting down the server")
|
log.Info("shutting down the server")
|
||||||
|
Loading…
Reference in New Issue
Block a user