This commit is contained in:
2021-11-30 18:33:22 +08:00
parent 86e4a92ab0
commit a26b99dd1e
+3 -1
View File
@@ -99,7 +99,9 @@ class HotReload extends Command
{
$pid = (int)file_get_contents(storage('.swoole.pid'));
$this->logger->debug('timer ticker.' . $pid . '.' . Process::kill($pid, 0));
if (!empty($pid) && !Process::kill($pid, 0)) {
if (empty($pid)) {
$this->trigger_reload();
} else if (!Process::kill($pid, 0)) {
if ($this->process && Process::kill($this->process->pid, 0)) {
echo 'service is shutdown you need reload.';
Process::kill($this->process->pid, -15);