diff --git a/core/src/main/java/jeeves/monitor/healthcheck/FreeFileHandlesHealthCheck.java b/core/src/main/java/jeeves/monitor/healthcheck/FreeFileHandlesHealthCheck.java index 414b96c4784..904901363c5 100644 --- a/core/src/main/java/jeeves/monitor/healthcheck/FreeFileHandlesHealthCheck.java +++ b/core/src/main/java/jeeves/monitor/healthcheck/FreeFileHandlesHealthCheck.java @@ -29,7 +29,7 @@ protected Result check() throws Exception { long free = unixMXBean.getMaxFileDescriptorCount() - unixMXBean.getOpenFileDescriptorCount(); double fivePercent = Math.max(2.0, ((double) unixMXBean.getMaxFileDescriptorCount()) * 0.01); if (free < fivePercent) { - Result.unhealthy("There are insufficient free file handles. Connections free:" + free); + return Result.unhealthy("There are insufficient free file handles. Connections free:" + free); } } return Result.healthy();