From acd0339b59202d2cd6a6909dd560214e13b29e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 7 Jan 2021 15:01:06 +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/OnRequest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HttpServer/Events/OnRequest.php b/HttpServer/Events/OnRequest.php index e213303c..61cf7590 100644 --- a/HttpServer/Events/OnRequest.php +++ b/HttpServer/Events/OnRequest.php @@ -40,12 +40,12 @@ class OnRequest extends Callback if ($req->is('favicon.ico')) { return \send(null, 404); } - \router()->dispatch(); + return \router()->dispatch(); } catch (ExitException | Error | \Throwable $exception) { if ($exception instanceof ExitException) { return \send($exception->getMessage(), $exception->getCode()); } - $this->sendErrorMessage($exception); + return $this->sendErrorMessage($exception); } finally { write(Json::encode(get_object_vars($request)), 'request'); $this->onAfter();