This commit is contained in:
2021-03-01 16:48:30 +08:00
parent 13ce5d980b
commit c103944295
+8 -3
View File
@@ -12,6 +12,7 @@ namespace Snowflake\Process;
use Exception; use Exception;
use Snowflake\Abstracts\Config; use Snowflake\Abstracts\Config;
use Snowflake\Exception\ComponentException;
use Snowflake\Snowflake; use Snowflake\Snowflake;
use Swoole\Coroutine; use Swoole\Coroutine;
use Swoole\Event; use Swoole\Event;
@@ -50,7 +51,7 @@ class ServerInotify extends Process
Event::add($this->inotify, [$this, 'check']); Event::add($this->inotify, [$this, 'check']);
Event::wait(); Event::wait();
} else { } else {
$this->loadByDir(APP_PATH . 'app'); $this->loadByDir(APP_PATH . 'app');
$this->loadByDir(APP_PATH . 'routes'); $this->loadByDir(APP_PATH . 'routes');
$this->loadByDir(__DIR__ . '/../../'); $this->loadByDir(__DIR__ . '/../../');
@@ -224,17 +225,21 @@ class ServerInotify extends Process
} catch (\Throwable $exception) { } catch (\Throwable $exception) {
} }
} }
$this->watchFiles = []; $this->watchFiles = [];
} }
/** /**
* @param $code * @param $code
* @param $message * @param $message
* @param $file * @param $file
* @param $line * @param $line
* @throws ComponentException
*/ */
protected function onErrorHandler($code, $message, $file, $line) 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('Error:' . $message);
$this->application->debug($file . ':' . $line); $this->application->debug($file . ':' . $line);
} }