Skip to content

Commit

Permalink
api: fix healthcheck when stream health is disabled (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
victorges authored Jul 5, 2023
1 parent 1b55638 commit d76d6fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (h *apiHandler) cors() middleware {

func (h *apiHandler) healthcheck(rw http.ResponseWriter, r *http.Request) {
status := http.StatusOK
if !h.core.IsHealthy() {
if h.core != nil && !h.core.IsHealthy() {
status = http.StatusServiceUnavailable
}
rw.WriteHeader(status)
Expand Down

0 comments on commit d76d6fc

Please sign in to comment.