变更
This commit is contained in:
+2
-14
@@ -159,7 +159,6 @@ class Server extends HttpService
|
|||||||
/**
|
/**
|
||||||
* @return void
|
* @return void
|
||||||
* @throws ConfigException
|
* @throws ConfigException
|
||||||
* @throws ReflectionException
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function onHotReload(): void
|
public function onHotReload(): void
|
||||||
@@ -167,23 +166,12 @@ class Server extends HttpService
|
|||||||
$this->onWorkerListener();
|
$this->onWorkerListener();
|
||||||
$reload = Config::get('reload.hot', false);
|
$reload = Config::get('reload.hot', false);
|
||||||
if ($reload !== 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);
|
$this->manager->addProcess(Kiri\Reload\Inotify::class);
|
||||||
} else {
|
} else {
|
||||||
$this->LoadRoutingList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return void
|
|
||||||
* @throws ReflectionException
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public function LoadRoutingList(): void
|
|
||||||
{
|
|
||||||
$this->router->scan_build_route();
|
$this->router->scan_build_route();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user