From 1b02303a4aa84572ceec063a1fe7f21c3d9163db Mon Sep 17 00:00:00 2001 From: justusbunsi Date: Thu, 7 Jul 2022 20:11:55 +0200 Subject: [PATCH] Use buffered channel as per docs https://pkg.go.dev/os/signal#Notify Signed-off-by: Steven Kriegler --- cmd/gitea-sonarqube-bot/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/gitea-sonarqube-bot/main.go b/cmd/gitea-sonarqube-bot/main.go index cf719be..ed949bc 100644 --- a/cmd/gitea-sonarqube-bot/main.go +++ b/cmd/gitea-sonarqube-bot/main.go @@ -78,7 +78,7 @@ func serveApi(c *cli.Context) error { log.Println("Listen on", srv.Addr) - quit := make(chan os.Signal) + quit := make(chan os.Signal, 1) signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM) <-quit log.Println("Shutting down server...")