From 31b336b9a772545c5cbba3f84c2410b760f4445f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 15 Sep 2020 18:55:23 +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 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/HttpServer/Events/OnRequest.php b/HttpServer/Events/OnRequest.php index b42f5993..308b750b 100644 --- a/HttpServer/Events/OnRequest.php +++ b/HttpServer/Events/OnRequest.php @@ -35,12 +35,8 @@ class OnRequest extends Callback */ public function onHandler(Request $request, Response $response) { + function_exists('trackerHookMalloc') && trackerHookMalloc(); try { - if (function_exists('trackerHookMalloc')) { - trackerHookMalloc(); - } - register_shutdown_function(OnRequest::class . '::shutdown', $response); - /** @var HRequest $sRequest */ [$sRequest, $sResponse] = [HRequest::create($request), HResponse::create($response)]; if ($sRequest->is('favicon.ico')) {