From 2ac024d49312faee3dfb3b9e1dc387278fd189ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 2 Sep 2020 18:25:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/Application.php | 10 +--------- system/Processes.php | 2 ++ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/system/Application.php b/system/Application.php index 285fa9a1..c299028d 100644 --- a/system/Application.php +++ b/system/Application.php @@ -31,15 +31,6 @@ class Application extends BaseApplication public $id = 'uniqueId'; - /** - * @throws Exception - */ - public function init() - { - Snowflake::get()->processes->initCore(); - } - - /** * @param string $service * @return $this @@ -64,6 +55,7 @@ class Application extends BaseApplication public function start() { $process = Snowflake::get()->processes; + $process->initCore(); $process->start(); } diff --git a/system/Processes.php b/system/Processes.php index 9d18d36c..06dc7238 100644 --- a/system/Processes.php +++ b/system/Processes.php @@ -5,6 +5,7 @@ namespace Snowflake; use Exception; +use HttpServer\Server; use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\SMTP; use Snowflake\Abstracts\Component; @@ -26,6 +27,7 @@ class Processes extends Component */ public function initCore() { + /** @var Server $manager */ $manager = Snowflake::get()->get('server'); $serverConfig = Config::get('servers', true);