This commit is contained in:
2025-12-18 15:39:40 +08:00
parent 37b59c8536
commit 968cdbd11a
7 changed files with 14 additions and 14 deletions
+4 -4
View File
@@ -114,7 +114,7 @@ class ServerCommand extends Command
*/
protected function stop(): int
{
$configs = config('server', []);
$configs = config('servers.server', []);
$instances = $this->asyncServer->sortService($configs['ports'] ?? []);
foreach ($instances as $config) {
$this->state->exit($config->port);
@@ -131,13 +131,13 @@ class ServerCommand extends Command
*/
protected function start(InputInterface $input): int
{
$this->asyncServer->addProcess(config('processes', []));
if (\config('reload.hot', false) === true) {
$this->asyncServer->addProcess(config('process', []));
if (\config('servers.reload.hot', false) === true) {
$this->asyncServer->addProcess([HotReload::class]);
} else {
di(Router::class)->scan_build_route();
}
$this->asyncServer->initCoreServers(config('server', []), (int)$input->getOption('daemon'));
$this->asyncServer->initCoreServers(config('servers.server', []), (int)$input->getOption('daemon'));
$this->asyncServer->start();
return 1;
}