mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 15:45:36 +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 {
|
||||
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;
|
||||
while (Framework::getProcessState(ZM_PROCESS_MASTER) !== false && $i > 0) {
|
||||
sleep(1);
|
||||
|
||||
Reference in New Issue
Block a user