This commit is contained in:
2021-03-01 15:15:48 +08:00
parent 6b83c24fd4
commit 0882dbcdfc
+3 -5
View File
@@ -350,21 +350,19 @@ class Server extends HttpService
* @return Http|Packet|Receive|Websocket|null
* @throws NotFindClassException
* @throws ReflectionException
* @throws Exception
*/
private function addListener($config): Packet|Websocket|Receive|Http|null
{
if ($this->isUse($config['port'])) {
return $this->error_stop($config['host'], $config['port']);
}
$newListener = $this->baseServer->addlistener($config['host'], $config['port'], $config['mode']);
if (!$newListener) {
var_dump($this->baseServer->getLastError());
exit($this->addError($this->baseServer->getLastError()));
}
var_dump(swoole_last_error());
var_dump($newListener, $config['host'], $config['port'], $config['mode']);
if (isset($config['settings']) && is_array($config['settings'])) {
$newListener->set($config['settings']);
}