改名
This commit is contained in:
+7
-3
@@ -63,10 +63,14 @@ class ServerCommand extends Command
|
|||||||
if (!in_array($input->getArgument('action'), self::ACTIONS)) {
|
if (!in_array($input->getArgument('action'), self::ACTIONS)) {
|
||||||
throw new Exception('I don\'t know what I want to do.');
|
throw new Exception('I don\'t know what I want to do.');
|
||||||
}
|
}
|
||||||
if ($manager->isRunner() && $input->getArgument('action') == 'start') {
|
|
||||||
throw new Exception('Service is running. Please use restart.');
|
$reusePort = Config::get('server.settings')[Constant::OPTION_ENABLE_REUSE_PORT] ?? false;
|
||||||
|
if (!$reusePort) {
|
||||||
|
if ($manager->isRunner() && $input->getArgument('action') == 'start') {
|
||||||
|
throw new Exception('Service is running. Please use restart.');
|
||||||
|
}
|
||||||
|
$manager->shutdown();
|
||||||
}
|
}
|
||||||
$manager->shutdown();
|
|
||||||
if ($input->getArgument('action') == 'stop') {
|
if ($input->getArgument('action') == 'stop') {
|
||||||
throw new Exception('shutdown success');
|
throw new Exception('shutdown success');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user