]> git.mxchange.org Git - friendica.git/commitdiff
memory check is now also only done once in a while
authorMichael <heluecht@pirati.ca>
Tue, 6 Jun 2017 04:00:24 +0000 (04:00 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 6 Jun 2017 04:00:24 +0000 (04:00 +0000)
include/poller.php

index 4bd1ee9e4af7fcff5800d34997ad3239ba72292d..68c5acbcbe227604ed4e1e0dd52adf8e2604b08c 100644 (file)
@@ -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