From 12be26adb3b2933562a778100a1710c474e28cb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 15 Dec 2020 19:04:25 +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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/HttpServer/Server.php b/HttpServer/Server.php index c2905f0a..f1b00341 100644 --- a/HttpServer/Server.php +++ b/HttpServer/Server.php @@ -202,6 +202,10 @@ class Server extends Application */ public function onProcessListener(): void { + $attributes = Snowflake::app()->getAttributes(); + $attributes->readControllers(CONTROLLER_PATH, 'App\Http\Controllers', 'controllers'); + $attributes->readControllers(SOCKET_PATH, 'App\Websocket', 'sockets'); + if (!($this->baseServer instanceof \Swoole\Server)) { return; }