From 356148f76e1eb6d4464db0756d77ffedd9d8ecce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 9 Mar 2021 19:47:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Action.php | 5 ++++- HttpServer/Server.php | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/HttpServer/Action.php b/HttpServer/Action.php index 1be47456..5e4aec4b 100644 --- a/HttpServer/Action.php +++ b/HttpServer/Action.php @@ -60,6 +60,7 @@ trait Action if (!empty($output)) { exec("kill -15 $content"); } + unset($content); $this->close($server); } @@ -90,7 +91,7 @@ trait Action if (!$this->masterIdCheck()) { break; } - usleep(100); + sleep(1); } echo PHP_EOL; } @@ -107,6 +108,8 @@ trait Action return false; } foreach ($files as $file) { + clearstatcache(true, $file->getFilename()); + $content = file_get_contents($file->getRealPath()); exec("ps -ax | awk '{ print $1 }' | grep -e '^{$content}$'", $output); if (count($output) > 0) { diff --git a/HttpServer/Server.php b/HttpServer/Server.php index 876b6c04..6b0d25ed 100644 --- a/HttpServer/Server.php +++ b/HttpServer/Server.php @@ -159,7 +159,6 @@ class Server extends HttpService * @param $host * @param $Port * @return Packet|Websocket|Receive|Http|null - * @throws ComponentException * @throws Exception */ public function error_stop($host, $Port): Packet|Websocket|Receive|Http|null