From d1614779570903255ded8cee079fd5644e1d853e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 30 Nov 2021 19:04:16 +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 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kiri-engine/FileListen/HotReload.php b/kiri-engine/FileListen/HotReload.php index 2392bc36..abf9d631 100644 --- a/kiri-engine/FileListen/HotReload.php +++ b/kiri-engine/FileListen/HotReload.php @@ -98,14 +98,11 @@ class HotReload extends Command public function healthCheck() { $pid = (int)file_get_contents(storage('.swoole.pid')); - $this->logger->debug('timer ticker.' . $pid . '.' . Process::kill($pid, 0)); if (empty($pid)) { + $this->logger->debug('service is shutdown you need reload.'); $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); - } + $this->logger->debug('service is shutdown you need reload.'); $this->trigger_reload(); } }