From 114f5d0279f7b9d47dc45c783c76e63a19233d44 Mon Sep 17 00:00:00 2001 From: Administrator Date: Fri, 19 Nov 2021 03:27:07 +0800 Subject: [PATCH] 1 --- kiri-engine/FileListen/Inotify.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/kiri-engine/FileListen/Inotify.php b/kiri-engine/FileListen/Inotify.php index 01558bc1..bd8040b6 100644 --- a/kiri-engine/FileListen/Inotify.php +++ b/kiri-engine/FileListen/Inotify.php @@ -51,9 +51,10 @@ class Inotify } - /** - * 开始监听 - */ + /** + * 开始监听 + * @throws Exception + */ public function check() { if (!($events = inotify_read($this->inotify))) { @@ -75,7 +76,10 @@ class Inotify if ($this->process->int !== -1) { return; } - $this->process->int = @swoole_timer_after(2000, [$this, 'reload']); + + usleep(200); + + $this->reload(); $this->process->isReloading = true; }