From 8091b44859c8d056781e3c87a609f36408ce1a7e Mon Sep 17 00:00:00 2001 From: Kelvin Luck Date: Thu, 6 Oct 2011 16:38:14 +0100 Subject: [PATCH] Running per-daemon setup after plugin setup. Allows the daemon setup to use plugins. In my case the config plugin loads stuff that is needed in my daemon setup. Fixes/ avoids [issue 1](https://github.com/shaneharter/PHP-Daemon/issues/1) --- Core/Daemon.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/Daemon.php b/Core/Daemon.php index 37c0d4a..0b41932 100644 --- a/Core/Daemon.php +++ b/Core/Daemon.php @@ -266,12 +266,12 @@ protected function check_environment(Array $errors = array()) */ private function init() { - // Run the per-daemon setup - $this->setup(); - // Setup any registered plugins foreach($this->plugins as $plugin) $this->{$plugin}->setup(); + + // Run the per-daemon setup + $this->setup(); // Set the initial lock and gracefully exit if another lock is detected if ($lock = $this->lock->check())