From ba7b4fddea9cf346916a23455f2273c97cf9e7c9 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 6 Jun 2017 04:00:24 +0000 Subject: [PATCH] memory check is now also only done once in a while --- include/poller.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/poller.php b/include/poller.php index 4bd1ee9e4a..68c5acbcbe 100644 --- a/include/poller.php +++ b/include/poller.php @@ -96,13 +96,13 @@ function poller_run($argv, $argc){ logger('Active worker limit reached, quitting.', LOGGER_DEBUG); return; } - Lock::remove('poller_worker'); - } - // Check free memory - if ($a->min_memory_reached()) { - logger('Memory limit reached, quitting.', LOGGER_DEBUG); - return; + // Check free memory + if ($a->min_memory_reached()) { + logger('Memory limit reached, quitting.', LOGGER_DEBUG); + return; + } + Lock::remove('poller_worker'); } // finally the work will be done