modify plugin name

This commit is contained in:
2022-02-14 16:04:09 +08:00
parent e094733d7b
commit 8f482ea3b6
2 changed files with 5 additions and 7 deletions
+5 -6
View File
@@ -42,7 +42,7 @@ class Server extends HttpService
public State $state; public State $state;
public Kiri\Server\Coroutine\Http $manager; public Server $manager;
/** /**
@@ -50,7 +50,7 @@ class Server extends HttpService
*/ */
public function init() public function init()
{ {
$this->manager = Kiri::getContainer()->get(Kiri\Server\Coroutine\Http::class); $this->manager = Kiri::getContainer()->get(Server::class);
$enable_coroutine = Config::get('servers.settings.enable_coroutine', false); $enable_coroutine = Config::get('servers.settings.enable_coroutine', false);
Config::set('servers.settings.enable_coroutine', true); Config::set('servers.settings.enable_coroutine', true);
if ($enable_coroutine != true) { if ($enable_coroutine != true) {
@@ -76,12 +76,12 @@ class Server extends HttpService
/** /**
* @return string * @return void
* @throws ConfigException * @throws ConfigException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
* @throws ReflectionException * @throws ReflectionException
* @throws Exception * @throws \Swoole\Exception
*/ */
public function start(): void public function start(): void
{ {
@@ -89,8 +89,7 @@ class Server extends HttpService
$rpcService = Config::get('rpc', []); $rpcService = Config::get('rpc', []);
if (!empty($rpcService)) { if (!empty($rpcService)) {
$this->manager->addListener($rpcService['type'], $rpcService['host'], $rpcService['port'], $this->manager->addListener($rpcService['type'], $rpcService['host'], $rpcService['port'], $rpcService['mode'], $rpcService);
$rpcService['mode'], $rpcService);
} }
$processes = array_merge($this->process, Config::get('processes', [])); $processes = array_merge($this->process, Config::get('processes', []));
-1
View File
@@ -27,6 +27,5 @@ class ServerProviders extends Providers
$console = $container->get(\Symfony\Component\Console\Application::class); $console = $container->get(\Symfony\Component\Console\Application::class);
$console->add($container->get(ServerCommand::class)); $console->add($container->get(ServerCommand::class));
} }
} }