remove repeated signal

remove repeated sigterm signal
pull/115/head
formych 2019-09-09 00:13:05 +08:00 committed by kun
parent 68e7126a9d
commit ec6941ab0c
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ func main() {
}() }()
s := make(chan os.Signal, 1) s := make(chan os.Signal, 1)
signal.Notify(s, os.Interrupt, syscall.SIGTERM, syscall.SIGTERM) signal.Notify(s, os.Interrupt, syscall.SIGTERM)
<-s <-s
log.Println("Making a graceful shutdown...") log.Println("Making a graceful shutdown...")
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)