From ea90aebd62a9ba7c067e8b3f43041b63a0d376fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Thu, 30 Mar 2023 18:24:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Server.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/Server.php b/Server.php index 3a40e98..d8db88f 100644 --- a/Server.php +++ b/Server.php @@ -159,7 +159,6 @@ class Server extends HttpService /** * @return void * @throws ConfigException - * @throws ReflectionException * @throws Exception */ public function onHotReload(): void @@ -167,25 +166,14 @@ class Server extends HttpService $this->onWorkerListener(); $reload = Config::get('reload.hot', false); if ($reload !== false) { - $this->provider->on(OnWorkerStart::class, [$this, 'LoadRoutingList']); + $this->provider->on(OnWorkerStart::class, [$this->router, 'scan_build_route']); $this->manager->addProcess(Kiri\Reload\Inotify::class); } else { - $this->LoadRoutingList(); + $this->router->scan_build_route(); } } - /** - * @return void - * @throws ReflectionException - * @throws Exception - */ - public function LoadRoutingList(): void - { - $this->router->scan_build_route(); - } - - /** * @return void * @throws ConfigException