Remove unnecessary loop and select when waiting on exitCh

This commit is contained in:
Ziad Hatahet 2019-12-13 20:09:05 -05:00
parent f5559ac003
commit a9f3a589ed

View file

@ -97,13 +97,8 @@ func main() {
} }
go smtp.Listen(apiconf, exitCh) go smtp.Listen(apiconf, exitCh)
for { <-exitCh
select {
case <-exitCh:
log.Printf("Received exit signal") log.Printf("Received exit signal")
os.Exit(0)
}
}
} }
/* /*