Signal channel should have a buffer of 1. (#381)
authorBrian Brazil <brian.brazil@robustperception.io>
Wed, 14 Nov 2018 18:00:11 +0000 (18:00 +0000)
committerGitHub <noreply@github.com>
Wed, 14 Nov 2018 18:00:11 +0000 (18:00 +0000)
Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
main.go

diff --git a/main.go b/main.go
index 238ecd45d7fe5cf0fc07cfedac6eaa0f6b7cc071..58779fc28a046d3883439f06b8b6fe1c5d361d9c 100644 (file)
--- a/main.go
+++ b/main.go
@@ -227,7 +227,7 @@ func main() {
 
        level.Info(logger).Log("msg", "Loaded config file")
 
-       hup := make(chan os.Signal)
+       hup := make(chan os.Signal, 1)
        reloadCh := make(chan chan error)
        signal.Notify(hup, syscall.SIGHUP)
        go func() {