From e7e24a14889efd92d0b47a99b60a050db42c4582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 5 Nov 2021 11:30:32 +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/Scaner.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/kiri-engine/FileListen/Scaner.php b/kiri-engine/FileListen/Scaner.php index 4cb48c5a..524c6b55 100644 --- a/kiri-engine/FileListen/Scaner.php +++ b/kiri-engine/FileListen/Scaner.php @@ -117,12 +117,20 @@ class Scaner } + private bool $isStop = false; + + public function clear() + { + $this->isStop = true; + } + + /** * @throws Exception */ public function tick() { - if ($this->process->isReloading) { + if ($this->process->isReloading || $this->isStop) { return; }