From a9f3a589ed301fb04320eea1069121bcd15570bd Mon Sep 17 00:00:00 2001 From: Ziad Hatahet Date: Fri, 13 Dec 2019 20:09:05 -0500 Subject: [PATCH] Remove unnecessary loop and select when waiting on exitCh --- main.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index 5e92f24..3c6322c 100644 --- a/main.go +++ b/main.go @@ -97,13 +97,8 @@ func main() { } go smtp.Listen(apiconf, exitCh) - for { - select { - case <-exitCh: - log.Printf("Received exit signal") - os.Exit(0) - } - } + <-exitCh + log.Printf("Received exit signal") } /*