From 1b72a913ec19bbbec48670ee0a32b82d02a8d89a Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sun, 28 Mar 2021 17:08:05 +0800 Subject: [PATCH] modify --- System/Process/ServerInotify.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/System/Process/ServerInotify.php b/System/Process/ServerInotify.php index 4529e28f..6b0d62e7 100644 --- a/System/Process/ServerInotify.php +++ b/System/Process/ServerInotify.php @@ -42,19 +42,19 @@ class ServerInotify extends Process { set_error_handler([$this, 'onErrorHandler']); $this->dirs = Config::get('inotify', false, [APP_PATH]); - if (extension_loaded('inotify')) { - $this->inotify = inotify_init(); - $this->events = IN_MODIFY | IN_DELETE | IN_CREATE | IN_MOVE; - - foreach ($this->dirs as $dir) { - $this->watch($dir); - } - Event::add($this->inotify, [$this, 'check']); - Event::wait(); - } else { +// if (extension_loaded('inotify')) { +// $this->inotify = inotify_init(); +// $this->events = IN_MODIFY | IN_DELETE | IN_CREATE | IN_MOVE; +// +// foreach ($this->dirs as $dir) { +// $this->watch($dir); +// } +// Event::add($this->inotify, [$this, 'check']); +// Event::wait(); +// } else { $this->loadDirs(); $this->tick(); - } +// } }