From a26b99dd1efb72c30e932c633cda746bf2f5d9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 30 Nov 2021 18:33:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kiri-engine/FileListen/HotReload.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kiri-engine/FileListen/HotReload.php b/kiri-engine/FileListen/HotReload.php index 701572a6..2392bc36 100644 --- a/kiri-engine/FileListen/HotReload.php +++ b/kiri-engine/FileListen/HotReload.php @@ -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);