This commit is contained in:
ZYunH 2019-05-23 11:37:34 +08:00 committed by 田欧
parent 0cbf290302
commit 78a8b5c9d5

View File

@ -1694,7 +1694,7 @@ func main() {
quit := make(chan os.Signal) quit := make(chan os.Signal)
// kill (no param) default send syscall.SIGTERM // kill (no param) default send syscall.SIGTERM
// kill -2 is syscall.SIGINT // kill -2 is syscall.SIGINT
// kill -9 is syscall.SIGKILL but can"t be catch, so don't need add it // kill -9 is syscall.SIGKILL but can't be catch, so don't need add it
signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM) signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)
<-quit <-quit
log.Println("Shutdown Server ...") log.Println("Shutdown Server ...")