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')) {