Skip to content

Commit

Permalink
add a judgment
Browse files Browse the repository at this point in the history
  • Loading branch information
caiyixiang committed Apr 13, 2017
1 parent 03cae88 commit 25a5b92
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/pkg/ingress/controller/launch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 25a5b92

Please sign in to comment.