Merge pull request #601 from caiyixiang/add-judgment

add a judgment
This commit is contained in:
Manuel Alejandro de Brito Fontes 2017-04-13 08:44:39 -03:00 committed by GitHub
commit 86128f87b4

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 {