From ae43f082077557ac9d68cd7462863d17e1346ff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 5 Mar 2021 17:00:09 +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 --- HttpServer/Server.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/HttpServer/Server.php b/HttpServer/Server.php index 21d9ea46..a738f922 100644 --- a/HttpServer/Server.php +++ b/HttpServer/Server.php @@ -464,9 +464,7 @@ class Server extends HttpService $event = Snowflake::app()->getEvent(); $event->on(Event::SERVER_WORKER_START, function () { $annotation = Snowflake::app()->getAttributes(); - if (env('debug') != 'true') { - return; - } + $router = Snowflake::app()->getRouter(); $annotation->instanceDirectoryFiles(CONTROLLER_PATH); @@ -484,9 +482,6 @@ class Server extends HttpService $event = Snowflake::app()->getEvent(); $event->on(Event::SERVER_WORKER_START, function () { $annotation = Snowflake::app()->getAttributes(); - if (env('debug') != 'true') { - return; - } $annotation->instanceDirectoryFiles(SOCKET_PATH); }); }