From 04bd95a5e4a3352794d821f1b7cf417017409c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 7 Sep 2020 12:07:07 +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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/System/Process/ServerInotify.php b/System/Process/ServerInotify.php index 04cd0af1..c3d4631c 100644 --- a/System/Process/ServerInotify.php +++ b/System/Process/ServerInotify.php @@ -40,6 +40,7 @@ class ServerInotify extends Process public function onHandler(\Swoole\Process $process) { Snowflake::setProcessId($process->pid); + set_error_handler([$this, 'onErrorHandler']); if (extension_loaded('inotify')) { $this->inotify = inotify_init(); $this->events = IN_MODIFY | IN_DELETE | IN_CREATE | IN_MOVE; @@ -184,7 +185,6 @@ class ServerInotify extends Process */ public function clearWatch() { - set_error_handler([$this, 'onErrorHandler']); foreach ($this->watchFiles as $wd) { try { inotify_rm_watch($this->inotify, $wd);