From 1fe2c01768bd287cddf2fcf2a77d84fa3803b540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 3 Sep 2020 00:35:03 +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 --- http-server/Server.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/http-server/Server.php b/http-server/Server.php index 981613fd..7ed1a463 100644 --- a/http-server/Server.php +++ b/http-server/Server.php @@ -60,16 +60,6 @@ class Server extends Application private $baseServer; - /** - * @throws ConfigException - * @throws Exception - */ - public function init() - { - $this->initCore(Config::get('servers', true)); - } - - /** * @param array $configs * @return Http|Packet|Receive|WebSocket @@ -97,13 +87,17 @@ class Server extends Application /** - * @return mixed + * @return void * * start server + * @throws ConfigException + * @throws Exception */ public function start() { - return $this->baseServer->start(); + $configs = Config::get('servers', true); + $baseServer = $this->initCore($configs); + $baseServer->start(); }