This commit is contained in:
2021-04-02 18:44:27 +08:00
parent cfcc12dcee
commit 2b2bd7a021
-18
View File
@@ -378,7 +378,6 @@ class Server extends HttpService
$service = Snowflake::app()->get('rpc-service');
$service->instance($this->swoole);
}
$this->onLoadHttpHandler();
return $this->swoole;
}
@@ -485,23 +484,6 @@ class Server extends HttpService
}
/**
* Load router handler
* @throws Exception
*/
public function onLoadHttpHandler()
{
$event = Snowflake::app()->getEvent();
$event->on(Event::SERVER_WORKER_START, function () {
$system = Snowflake::app();
$system->getRouter()->loadRouterSetting();
$system->getAnnotation()->instanceDirectoryFiles(APP_PATH);
});
}
/**
* @param $type
* @return string