From 65758d5eea40e906753c27be6b9229c955b22641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 21 Oct 2020 15:50:43 +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/Events/OnShutdown.php | 1 + System/Error/ErrorHandler.php | 11 ----------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/HttpServer/Events/OnShutdown.php b/HttpServer/Events/OnShutdown.php index 95c35a5a..7fe7f809 100644 --- a/HttpServer/Events/OnShutdown.php +++ b/HttpServer/Events/OnShutdown.php @@ -33,6 +33,7 @@ class OnShutdown extends Callback */ public function onHandler(Server $server) { + $this->debug('server shutdown~'); $this->system_mail('server shutdown~'); $event = Snowflake::app()->getEvent(); $event->trigger(Event::SERVER_SHUTDOWN); diff --git a/System/Error/ErrorHandler.php b/System/Error/ErrorHandler.php index c09ab526..c56f4e22 100644 --- a/System/Error/ErrorHandler.php +++ b/System/Error/ErrorHandler.php @@ -62,17 +62,6 @@ class ErrorHandler extends Component implements ErrorInterface $message = array_shift($messages); - $workers = glob(storage(null, 'worker') . '/*'); - foreach ($workers as $worker) { - $content = file_get_contents($worker); - posix_kill($content, 9); - } - - $content = '[error]: ' . date('Y-m-d H:i:s') . PHP_EOL; - $content .= print_r($lastError, true); - - Snowflake::writeFile(storage('shutdown.log'), $content, FILE_APPEND); - $this->sendError($message, $lastError['file'], $lastError['line']); }