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