From b2c0b23523ce7874b40f6f1b34499403850b283f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 27 Apr 2021 18:04:58 +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, 4 insertions(+) diff --git a/HttpServer/Events/OnRequest.php b/HttpServer/Events/OnRequest.php index 34242d76..20e30875 100644 --- a/HttpServer/Events/OnRequest.php +++ b/HttpServer/Events/OnRequest.php @@ -51,11 +51,15 @@ class OnRequest extends Callback public function onHandler(Request $request, Response $response): mixed { try { + + Coroutine::defer(function () { fire(Event::SYSTEM_RESOURCE_RELEASES); }); /** @var HResponse $response */ [$request, $response] = OnRequest::createContext($request, $response); + + return \response()->send('ok', 200); if ($request->is('favicon.ico')) { return $response->close(404); }