Skip to content

Commit

Permalink
Implement checkContainersAvailable flag
Browse files Browse the repository at this point in the history
  • Loading branch information
rmaucher committed Sep 11, 2020
1 parent 6019533 commit 120bf9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion java/org/apache/catalina/valves/HealthCheckValve.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void invoke(Request request, Response response)
context ? request.getRequestPathMB() : request.getDecodedRequestURIMB();
if (urlMB.equals(path)) {
response.setContentType("application/json");
if (isAvailable(getContainer())) {
if (!checkContainersAvailable || (checkContainersAvailable && isAvailable(getContainer()))) {
response.getOutputStream().print(UP);
} else {
response.setStatus(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
Expand Down

0 comments on commit 120bf9d

Please sign in to comment.