Treat sigterm as a clean shutdown signal (#4277)

(cherry picked from commit 40fac0a9b4)
This commit is contained in:
Daniel Nelson 2018-06-12 16:44:04 -07:00 committed by Daniel Nelson
parent 8cdf39cf66
commit 46fa0d79e5
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
1 changed files with 2 additions and 2 deletions

View File

@ -147,11 +147,11 @@ func reloadLoop(
shutdown := make(chan struct{})
signals := make(chan os.Signal)
signal.Notify(signals, os.Interrupt, syscall.SIGHUP)
signal.Notify(signals, os.Interrupt, syscall.SIGHUP, syscall.SIGTERM)
go func() {
select {
case sig := <-signals:
if sig == os.Interrupt {
if sig == os.Interrupt || sig == syscall.SIGTERM {
close(shutdown)
}
if sig == syscall.SIGHUP {