This commit is contained in:
2020-09-03 00:35:03 +08:00
parent c00bc8094f
commit 1fe2c01768
+6 -12
View File
@@ -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();
}