From c1039442950020621e52afab93d252202bc7e15c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 1 Mar 2021 16:48:30 +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 --- System/Process/ServerInotify.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/System/Process/ServerInotify.php b/System/Process/ServerInotify.php index 1224742d..b2b0f763 100644 --- a/System/Process/ServerInotify.php +++ b/System/Process/ServerInotify.php @@ -12,6 +12,7 @@ namespace Snowflake\Process; use Exception; use Snowflake\Abstracts\Config; +use Snowflake\Exception\ComponentException; use Snowflake\Snowflake; use Swoole\Coroutine; use Swoole\Event; @@ -50,7 +51,7 @@ class ServerInotify extends Process Event::add($this->inotify, [$this, 'check']); Event::wait(); } else { - $this->loadByDir(APP_PATH . 'app'); + $this->loadByDir(APP_PATH . 'app'); $this->loadByDir(APP_PATH . 'routes'); $this->loadByDir(__DIR__ . '/../../'); @@ -224,17 +225,21 @@ class ServerInotify extends Process } catch (\Throwable $exception) { } } - $this->watchFiles = []; - } + $this->watchFiles = []; + } /** * @param $code * @param $message * @param $file * @param $line + * @throws ComponentException */ protected function onErrorHandler($code, $message, $file, $line) { + if (str_contains($message, 'The file descriptor is not an inotify instance')) { + return; + } $this->application->debug('Error:' . $message); $this->application->debug($file . ':' . $line); }