From f2d71b58ce88aec0cad9b574355f537b3d742e08 Mon Sep 17 00:00:00 2001 From: walkor Date: Tue, 20 Aug 2024 09:48:47 +0800 Subject: [PATCH] Update Monitor.php --- process/Monitor.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/process/Monitor.php b/process/Monitor.php index 196095f..6525a6d 100644 --- a/process/Monitor.php +++ b/process/Monitor.php @@ -89,7 +89,12 @@ public function __construct($monitorDir, $monitorExtensions, array $options = [] static::resume(); $this->paths = (array)$monitorDir; $this->extensions = $monitorExtensions; - $this->loadedFiles = array_flip(get_included_files()); + foreach (get_included_files() as $index => $file) { + $this->loadedFiles[$file] = $index; + if (strpos($file, 'webman-framework/src/support/App.php')) { + break; + } + } if (!Worker::getAllWorkers()) { return; }