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); }