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); }); }