From 928b855ec5f41915f8184bbae4bbe7256cc5a31b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 15 Dec 2020 15:52:06 +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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/HttpServer/Server.php b/HttpServer/Server.php index b90f4545..bbe2755f 100644 --- a/HttpServer/Server.php +++ b/HttpServer/Server.php @@ -208,8 +208,8 @@ class Server extends Application } $attributes = Snowflake::app()->getAttributes(); - $attributes->readControllers(CONTROLLER_PATH, 'controllers'); - $attributes->readControllers(SOCKET_PATH, 'sockets'); + $attributes->readControllers(CONTROLLER_PATH, 'App\Http\Controllers', 'controllers'); + $attributes->readControllers(SOCKET_PATH, 'App\Websocket', 'sockets'); $processes = Config::get('processes'); if (!empty($processes) && is_array($processes)) { @@ -461,7 +461,7 @@ class Server extends Application $event = Snowflake::app()->getEvent(); $event->on(Event::SERVER_WORKER_START, function () { $attributes = Snowflake::app()->getAttributes(); - $attributes->readControllers(SOCKET_PATH, 'sockets'); + $attributes->readControllers(SOCKET_PATH, 'App\Websocket', 'sockets'); $aliases = $attributes->getAlias('sockets'); foreach ($aliases as $alias) {