fix(run.go): use a non-blocking channel receive
All checks were successful
continuous-integration/drone/push Build is passing

adding the started channel and receiving in a blocking fashion meant the
program flow never got to blocking on the quit channel after setting up
signal intercepts. this commit turns the blocking receive on `started`
to a non-blocking one.
This commit is contained in:
leo 2023-05-03 03:03:06 +02:00
parent d5ed25f1f1
commit 1ba95c3d37
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ

11
run.go

@ -169,9 +169,14 @@ func run() error {
started <- err
}(started)
err = <-started
if err != nil {
return err
// non-blocking channel receive.
select {
case err := <-started:
if err != nil {
return err
}
default:
}
quit := make(chan os.Signal, 1)