Skip to content

Commit

Permalink
fix superfluous response.WriteHeader (#4980)
Browse files Browse the repository at this point in the history
Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian authored Feb 13, 2025
1 parent 3160100 commit d7714f9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/util/health_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import (

func DefaultHealthCheckHandler(w http.ResponseWriter, _ *http.Request) {
if _, err := w.Write([]byte("ok")); err != nil {
klog.Error(err)
w.WriteHeader(http.StatusInternalServerError)
return
klog.Errorf("failed to write health check response: %v", err)
}

w.WriteHeader(http.StatusOK)
}

0 comments on commit d7714f9

Please sign in to comment.