This commit is contained in:
2021-09-07 17:04:50 +08:00
parent 7d9f29d626
commit 15ffef7d1a
+2 -3
View File
@@ -387,18 +387,17 @@ class ServerManager
/** /**
* @param string $type
* @param array $settings * @param array $settings
* @throws ReflectionException * @throws ReflectionException
* @throws Exception * @throws Exception
*/ */
private function addDefaultListener(string $type, array $settings): void private function addDefaultListener(array $settings): void
{ {
if (($this->server->setting['task_worker_num'] ?? 0) > 0) { if (($this->server->setting['task_worker_num'] ?? 0) > 0) {
$this->addTaskListener($settings['events']); $this->addTaskListener($settings['events']);
} }
$this->addServiceEvents(ServerManager::DEFAULT_EVENT, $this->server);
$this->container->setBindings(SwooleServerInterface::class, $this->server); $this->container->setBindings(SwooleServerInterface::class, $this->server);
$this->addServiceEvents(ServerManager::DEFAULT_EVENT, $this->server);
} }