eee
This commit is contained in:
@@ -137,9 +137,8 @@ class HotReload extends AbstractProcess
|
|||||||
*/
|
*/
|
||||||
protected function clear(): void
|
protected function clear(): void
|
||||||
{
|
{
|
||||||
var_dump($this->watches);
|
foreach ($this->watches as $watch) {
|
||||||
foreach ($this->watches as $key => $watch) {
|
@inotify_rm_watch($this->pipe, $watch);
|
||||||
@inotify_rm_watch($this->pipe, $key);
|
|
||||||
}
|
}
|
||||||
$this->watches = [];
|
$this->watches = [];
|
||||||
}
|
}
|
||||||
@@ -153,7 +152,7 @@ class HotReload extends AbstractProcess
|
|||||||
if (str_ends_with($directory, '.php') === true) {
|
if (str_ends_with($directory, '.php') === true) {
|
||||||
$wd = inotify_add_watch($this->pipe, $directory, IN_MODIFY | IN_MOVE | IN_CREATE | IN_DELETE);
|
$wd = inotify_add_watch($this->pipe, $directory, IN_MODIFY | IN_MOVE | IN_CREATE | IN_DELETE);
|
||||||
|
|
||||||
$this->watches[$wd] = $directory;
|
$this->watches[] = $wd;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user