From 0849870234b1726039e8c5b630d9db8c9438afbf Mon Sep 17 00:00:00 2001 From: xl Date: Mon, 18 Nov 2024 16:42:28 +0800 Subject: [PATCH] eee --- Abstracts/HotReload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Abstracts/HotReload.php b/Abstracts/HotReload.php index 74e32fb..93f2973 100644 --- a/Abstracts/HotReload.php +++ b/Abstracts/HotReload.php @@ -74,8 +74,8 @@ class HotReload extends AbstractProcess */ public function process(Process|null $process): void { + $this->pipe = inotify_init(); $this->addListen(); - Event::add($this->pipe, function () use ($process) { $read = inotify_read($this->pipe); @@ -126,7 +126,6 @@ class HotReload extends AbstractProcess */ protected function addListen(): void { - $this->pipe = inotify_init(); foreach (config('reload.listen') as $value) { $this->readDirectory($value); } @@ -138,6 +137,7 @@ class HotReload extends AbstractProcess */ protected function clear(): void { + var_dump($this->watches); foreach ($this->watches as $key => $watch) { inotify_rm_watch($this->pipe, $key); }