This commit is contained in:
2020-09-02 17:55:20 +08:00
parent 6decf62d03
commit ac5c6b0320
+4
View File
@@ -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);