From ac5c6b032026d0cf0e630774401c91e790b9d31a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 2 Sep 2020 17:55:20 +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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/http-server/Server.php b/http-server/Server.php index 4a8f94fc..c2ff5a77 100644 --- a/http-server/Server.php +++ b/http-server/Server.php @@ -17,6 +17,7 @@ use HttpServer\Service\WebSocket; use Exception; use ReflectionException; use Snowflake\Config; +use Snowflake\Core\ArrayAccess; use Snowflake\Event; use Snowflake\Exception\ComponentException; use Snowflake\Exception\ConfigException; @@ -135,6 +136,9 @@ class Server extends Application if (!isset($this->server[$config['type']])) { throw new Exception('Unknown server type(' . $config['type'] . ').'); } + if (isset($config['settings'])) { + $settings = ArrayAccess::merge($settings, $config['settings']); + } $server = $this->dispatchCreate($config, $settings); if (isset($config['events'])) { $this->createEventListen($config);