From 170de0b8222db6acbc4e03c0df18087508333e6d Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Mon, 26 Jul 2021 17:05:41 +0800 Subject: [PATCH] modify --- System/Process/ServerInotify.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/System/Process/ServerInotify.php b/System/Process/ServerInotify.php index 0a1dbcff..a0aca4d1 100644 --- a/System/Process/ServerInotify.php +++ b/System/Process/ServerInotify.php @@ -157,6 +157,9 @@ class ServerInotify implements CustomProcess } + const LISTEN_TYPE = [IN_CREATE, IN_DELETE, IN_MODIFY, IN_MOVED_TO, IN_MOVED_FROM]; + + /** * 开始监听 */ @@ -173,7 +176,7 @@ class ServerInotify implements CustomProcess } foreach ($events as $ev) { - if (!in_array($ev['mask'], [IN_CREATE, IN_DELETE, IN_MODIFY, IN_MOVED_TO, IN_MOVED_FROM])) { + if (!in_array($ev['mask'], static::LISTEN_TYPE)) { continue; } //非重启类型