Skip to content

Commit d7714f9

Browse files
authored
fix superfluous response.WriteHeader (#4980)
Signed-off-by: zhangzujian <[email protected]>
1 parent 3160100 commit d7714f9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pkg/util/health_check.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ import (
88

99
func DefaultHealthCheckHandler(w http.ResponseWriter, _ *http.Request) {
1010
if _, err := w.Write([]byte("ok")); err != nil {
11-
klog.Error(err)
12-
w.WriteHeader(http.StatusInternalServerError)
13-
return
11+
klog.Errorf("failed to write health check response: %v", err)
1412
}
15-
16-
w.WriteHeader(http.StatusOK)
1713
}

0 commit comments

Comments
 (0)