diff --git a/ServerCommand.php b/ServerCommand.php index 11d5d54..fb63f01 100644 --- a/ServerCommand.php +++ b/ServerCommand.php @@ -4,15 +4,14 @@ declare(strict_types=1); namespace Server; -use Note\Inject; use Exception; use Kiri\Abstracts\Config; use Kiri\Events\EventDispatch; use Kiri\Exception\ConfigException; use Kiri\Kiri; +use Note\Inject; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; -use Server\Events\OnServerBeforeStart; use Swoole\Coroutine; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; @@ -87,6 +86,7 @@ class ServerCommand extends Command private function configure_set() { $enable_coroutine = Config::get('servers.settings.enable_coroutine', false); + Config::set('servers.settings.enable_coroutine', true); if ($enable_coroutine != true) { return; } diff --git a/ServerManager.php b/ServerManager.php index 2ba4526..28bd28c 100644 --- a/ServerManager.php +++ b/ServerManager.php @@ -136,7 +136,6 @@ class ServerManager extends Component * @throws ConfigException * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface - * @throws ReflectionException */ public function initBaseServer($configs, int $daemon = 0): void { @@ -197,7 +196,6 @@ class ServerManager extends Component * @throws ConfigException * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface - * @throws ReflectionException * @throws Exception */ private function startListenerHandler(ServerManager $context, array $config, int $daemon = 0)