From 6c48a6c90766c366334e370cbde058b5a09a97a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 3 Sep 2020 01:42:39 +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 --- http-server/Abstracts/Callback.php | 2 +- http-server/Events/OnShutdown.php | 2 +- http-server/Events/OnWorkerError.php | 12 ++++++------ system/Process/ServerInotify.php | 2 -- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/http-server/Abstracts/Callback.php b/http-server/Abstracts/Callback.php index 925205e8..f2cd4221 100644 --- a/http-server/Abstracts/Callback.php +++ b/http-server/Abstracts/Callback.php @@ -96,7 +96,7 @@ abstract class Callback extends Application $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = Config::get('email.username'); // SMTP username $mail->Password = Config::get('email.password'); // SMTP password - $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged + $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged $mail->Port = Config::get('email.port'); // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above $mail->setFrom(Config::get('email.send.address'), Config::get('email.send.nickname')); return $mail; diff --git a/http-server/Events/OnShutdown.php b/http-server/Events/OnShutdown.php index 67e244c7..3b10f124 100644 --- a/http-server/Events/OnShutdown.php +++ b/http-server/Events/OnShutdown.php @@ -32,7 +32,7 @@ class OnShutdown extends Callback */ public function onHandler(Server $server) { -// $this->system_mail('server shutdown~'); + $this->system_mail('server shutdown~'); $event = Snowflake::get()->getEvent(); if (!$event->exists(Event::SERVER_SHUTDOWN)) { return; diff --git a/http-server/Events/OnWorkerError.php b/http-server/Events/OnWorkerError.php index 1a8a2236..e85d9ddf 100644 --- a/http-server/Events/OnWorkerError.php +++ b/http-server/Events/OnWorkerError.php @@ -27,12 +27,12 @@ class OnWorkerError extends Callback if (!Config::has('email')) { return; } -// $this->system_mail(print_r([ -// '$worker_pid' => $worker_pid, -// '$worker_id' => $worker_id, -// '$exit_code' => $exit_code, -// '$signal' => $signal, -// ], true)); + $this->system_mail(print_r([ + '$worker_pid' => $worker_pid, + '$worker_id' => $worker_id, + '$exit_code' => $exit_code, + '$signal' => $signal, + ], true)); } } diff --git a/system/Process/ServerInotify.php b/system/Process/ServerInotify.php index 1df07a92..5857b96e 100644 --- a/system/Process/ServerInotify.php +++ b/system/Process/ServerInotify.php @@ -61,8 +61,6 @@ class ServerInotify extends Process */ public function tick() { - $this->debug('file modify listener.'); - $this->loadByDir(APP_PATH . 'app', true); }