add a judgment

This commit is contained in:
caiyixiang 2017-04-13 16:38:07 +08:00
parent 03cae88983
commit 25a5b92e94

View file

@ -183,7 +183,10 @@ func registerHandlers(enableProfiling bool, port int, ic *GenericController) {
})
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 {