From e46ad90c46bb190088fc1e2332d730a9499c4a6f Mon Sep 17 00:00:00 2001 From: xl Date: Mon, 18 Nov 2024 16:50:22 +0800 Subject: [PATCH] eee --- Abstracts/HotReload.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Abstracts/HotReload.php b/Abstracts/HotReload.php index 4135821..be3b7b4 100644 --- a/Abstracts/HotReload.php +++ b/Abstracts/HotReload.php @@ -137,9 +137,8 @@ class HotReload extends AbstractProcess */ protected function clear(): void { - var_dump($this->watches); - foreach ($this->watches as $key => $watch) { - @inotify_rm_watch($this->pipe, $key); + foreach ($this->watches as $watch) { + @inotify_rm_watch($this->pipe, $watch); } $this->watches = []; } @@ -153,7 +152,7 @@ class HotReload extends AbstractProcess if (str_ends_with($directory, '.php') === true) { $wd = inotify_add_watch($this->pipe, $directory, IN_MODIFY | IN_MOVE | IN_CREATE | IN_DELETE); - $this->watches[$wd] = $directory; + $this->watches[] = $wd; } }