This commit is contained in:
2021-11-19 03:27:07 +08:00
parent 5638d171d0
commit 114f5d0279
+8 -4
View File
@@ -51,9 +51,10 @@ class Inotify
}
/**
* 开始监听
*/
/**
* 开始监听
* @throws Exception
*/
public function check()
{
if (!($events = inotify_read($this->inotify))) {
@@ -75,7 +76,10 @@ class Inotify
if ($this->process->int !== -1) {
return;
}
$this->process->int = @swoole_timer_after(2000, [$this, 'reload']);
usleep(200);
$this->reload();
$this->process->isReloading = true;
}