diff --git a/kiri-engine/FileListen/HotReload.php b/kiri-engine/FileListen/HotReload.php index 7f2876c4..e66ca84e 100644 --- a/kiri-engine/FileListen/HotReload.php +++ b/kiri-engine/FileListen/HotReload.php @@ -67,6 +67,7 @@ class HotReload extends Command */ protected function initCore() { + set_error_handler([$this, 'errorHandler']); $this->dirs = Config::get('inotify', [APP_PATH . 'app']); if (!extension_loaded('inotify')) { $this->driver = Kiri::getDi()->make(Scaner::class, [$this->dirs, $this]); @@ -84,7 +85,6 @@ class HotReload extends Command public function setProcessName() { swoole_async_set(['enable_coroutine' => FALSE]); - set_error_handler([$this, 'errorHandler']); if (Kiri::getPlatform()->isLinux()) { swoole_set_process_name('[' . Config::get('id', 'sw service.') . '].sw:wather'); }