mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-25 01:25:34 +08:00
prevent server:stop command error when daemon file not exists
This commit is contained in:
@@ -43,7 +43,9 @@ class ServerStopCommand extends DaemonCommand
|
|||||||
} else {
|
} else {
|
||||||
parent::execute($input, $output);
|
parent::execute($input, $output);
|
||||||
}
|
}
|
||||||
Process::kill(intval($this->daemon_file['pid']), SIGTERM);
|
if ($this->daemon_file !== null) {
|
||||||
|
Process::kill(intval($this->daemon_file['pid']), SIGTERM);
|
||||||
|
}
|
||||||
$i = 10;
|
$i = 10;
|
||||||
while (Framework::getProcessState(ZM_PROCESS_MASTER) !== false && $i > 0) {
|
while (Framework::getProcessState(ZM_PROCESS_MASTER) !== false && $i > 0) {
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user