add a judgment
This commit is contained in:
parent
03cae88983
commit
25a5b92e94
1 changed files with 4 additions and 1 deletions
|
@ -183,7 +183,10 @@ func registerHandlers(enableProfiling bool, port int, ic *GenericController) {
|
||||||
})
|
})
|
||||||
|
|
||||||
mux.HandleFunc("/stop", func(w http.ResponseWriter, r *http.Request) {
|
mux.HandleFunc("/stop", func(w http.ResponseWriter, r *http.Request) {
|
||||||
syscall.Kill(syscall.Getpid(), syscall.SIGTERM)
|
err := syscall.Kill(syscall.Getpid(), syscall.SIGTERM)
|
||||||
|
if err != nil {
|
||||||
|
glog.Errorf("unexpected error: %v", err)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if enableProfiling {
|
if enableProfiling {
|
||||||
|
|
Loading…
Reference in a new issue