From 558688c2aa073d486a62ca842b10856bc7c48602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 29 Mar 2021 18:02:47 +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/Server.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/HttpServer/Server.php b/HttpServer/Server.php index b11d326a..6f65e4b4 100644 --- a/HttpServer/Server.php +++ b/HttpServer/Server.php @@ -136,6 +136,21 @@ class Server extends HttpService Coroutine::set(['enable_deadlock_check' => false]); + return $this->execute($baseServer); + } + + + /** + * @param $baseServer + * @return mixed + * @throws ComponentException + * @throws NotFindClassException + * @throws ReflectionException + */ + private function execute($baseServer): mixed + { + $app = Snowflake::app(); + $app->set('base-server', $baseServer); return $baseServer->start(); }