From f858cecf1af72503de7e145fc65e45180ecae918 Mon Sep 17 00:00:00 2001 From: xl Date: Mon, 18 Nov 2024 13:40:23 +0800 Subject: [PATCH] eee --- Abstracts/HotReload.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Abstracts/HotReload.php b/Abstracts/HotReload.php index b6bb2d9..1d7150b 100644 --- a/Abstracts/HotReload.php +++ b/Abstracts/HotReload.php @@ -78,7 +78,7 @@ class HotReload extends AbstractProcess $read = inotify_read($this->pipe); foreach ($read as $item) { - $this->reWatch($this->watches[$item['mask']]); + $this->reWatch($this->watches[$item['wd']]); } $this->reload(); @@ -119,7 +119,7 @@ class HotReload extends AbstractProcess /** - * @param string $directory + * @param int $directory * @return void */ public function reWatch(int $directory): void @@ -129,6 +129,8 @@ class HotReload extends AbstractProcess $wd = inotify_add_watch($this->pipe, $directory, IN_MODIFY | IN_MOVE | IN_CREATE | IN_DELETE); + var_dump($wd); + $this->watches[$wd] = $directory; } }