From 68ee0244a252a072863c68403e6578eb070c54c1 Mon Sep 17 00:00:00 2001 From: Administrator Date: Sat, 20 Nov 2021 02:27:25 +0800 Subject: [PATCH] 1 --- kiri-engine/FileListen/Inotify.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/kiri-engine/FileListen/Inotify.php b/kiri-engine/FileListen/Inotify.php index 77c02018..0752e922 100644 --- a/kiri-engine/FileListen/Inotify.php +++ b/kiri-engine/FileListen/Inotify.php @@ -14,6 +14,9 @@ class Inotify private array $watchFiles = []; + protected bool $isReloading; + + protected int $cid; const IG_DIR = [APP_PATH . 'commands', APP_PATH . '.git', APP_PATH . '.gitee']; @@ -60,7 +63,7 @@ class Inotify if (!($events = inotify_read($this->inotify))) { return; } - if ($this->process->isReloading) { + if ($this->isReloading) { return; } @@ -81,11 +84,11 @@ class Inotify */ public function reload() { - if ($this->process->isReloading) { + if ($this->isReloading) { return; } - $this->process->isReloading = true; + $this->isReloading = true; $this->process->trigger_reload(); $this->clearWatch(); @@ -93,7 +96,7 @@ class Inotify $this->watch($root); } $this->process->int = -1; - $this->process->isReloading = FALSE; + $this->isReloading = FALSE; }