From 4b43e825f4cbae5c93829abbf4ad4cefb4b0c0cd Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Fri, 12 Jun 2015 14:45:02 +0100 Subject: [PATCH] Rename block to hupReady Remove the write to the channel as per comments. --- main.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 079c23de1..5a13880b9 100644 --- a/main.go +++ b/main.go @@ -251,10 +251,10 @@ func (p *prometheus) Serve() { // early as possible, but ignore it until we are ready to handle reloading // our config. hup := make(chan os.Signal) - block := make(chan bool) + hupReady := make(chan bool) signal.Notify(hup, syscall.SIGHUP) go func() { - <-block + <-hupReady for range hup { p.reloadConfig() } @@ -293,8 +293,7 @@ func (p *prometheus) Serve() { go p.webService.Run() // Wait for reload or termination signals. - block <- true // Unblock SIGHUP handler. - close(block) + close(hupReady) // Unblock SIGHUP handler. term := make(chan os.Signal) signal.Notify(term, os.Interrupt, syscall.SIGTERM)