diff --git a/HttpServer/Events/OnHandshake.php b/HttpServer/Events/OnHandshake.php index 6898e582..401babc1 100644 --- a/HttpServer/Events/OnHandshake.php +++ b/HttpServer/Events/OnHandshake.php @@ -141,7 +141,9 @@ class OnHandshake extends Callback if (($node = $router->find_path($sRequest)) === null) { return $this->disconnect($response, 404); } - return $node->dispatch($sRequest, Response::create($response)); + Response::create($response); + + return $node->dispatch($sRequest, \response()); }