This commit is contained in:
2021-03-09 20:01:39 +08:00
parent 356148f76e
commit 9efcb043c5
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -105,6 +105,7 @@ trait Action
echo '.'; echo '.';
$files = new \DirectoryIterator($this->getWorkerPath()); $files = new \DirectoryIterator($this->getWorkerPath());
if ($files->getSize() < 1) { if ($files->getSize() < 1) {
unset($files);
return false; return false;
} }
foreach ($files as $file) { foreach ($files as $file) {
@@ -117,7 +118,9 @@ trait Action
} else { } else {
@unlink($file->getRealPath()); @unlink($file->getRealPath());
} }
unset($file);
} }
unset($files);
return true; return true;
} }
+1
View File
@@ -191,6 +191,7 @@ class Server extends HttpService
exec('lsof -i :' . $value['port'] . ' | grep -i "LISTEN"', $output); exec('lsof -i :' . $value['port'] . ' | grep -i "LISTEN"', $output);
} }
if (!empty($output)) { if (!empty($output)) {
unset($output);
return true; return true;
} }
} }