use buffered chan for os.Signal

This commit is contained in:
i-norden 2021-10-11 11:06:04 -05:00
parent 2fc57c2f31
commit d53bfae243

View File

@ -100,7 +100,7 @@ func serve() {
logWithCommand.Info("state validator disabled")
}
shutdown := make(chan os.Signal)
shutdown := make(chan os.Signal, 1)
signal.Notify(shutdown, os.Interrupt)
<-shutdown
if graphQL != nil {