This commit is contained in:
2020-09-07 11:51:14 +08:00
parent 4f57a5d237
commit 2b037a858b
+6
View File
@@ -177,16 +177,22 @@ class ServerInotify extends Process
$server->reload(); $server->reload();
} }
/** /**
* 清理所有inotify监听 * 清理所有inotify监听
*/ */
public function clearWatch() public function clearWatch()
{ {
try {
foreach ($this->watchFiles as $wd) { foreach ($this->watchFiles as $wd) {
@inotify_rm_watch($this->inotify, $wd); @inotify_rm_watch($this->inotify, $wd);
} }
} catch (Exception $exception) {
$this->debug($exception->getMessage());
} finally {
$this->watchFiles = []; $this->watchFiles = [];
} }
}
/** /**