also handle sigterm
This commit is contained in:
parent
f72d1a6397
commit
615b5367d8
2
web.go
2
web.go
|
@ -31,6 +31,7 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
@ -2054,6 +2055,7 @@ var readyalready = make(chan bool)
|
||||||
func enditall() {
|
func enditall() {
|
||||||
sig := make(chan os.Signal)
|
sig := make(chan os.Signal)
|
||||||
signal.Notify(sig, os.Interrupt)
|
signal.Notify(sig, os.Interrupt)
|
||||||
|
signal.Notify(sig, syscall.SIGTERM)
|
||||||
<-sig
|
<-sig
|
||||||
count := 0
|
count := 0
|
||||||
log.Printf("stopping...")
|
log.Printf("stopping...")
|
||||||
|
|
Loading…
Reference in New Issue