This commit is contained in:
2021-08-03 10:39:09 +08:00
parent 7a6104c735
commit 20bae71fd7
2 changed files with 0 additions and 16 deletions
-15
View File
@@ -392,21 +392,6 @@ class ServerManager extends Abstracts\Server
}
/**
* @param $reflect
* @param $settings
*/
private function addCloseOrDisconnect($reflect, $settings): void
{
if (swoole_version() >= '4.7') {
$reflect->setEvents(Constant::DISCONNECT, $settings['events'][Constant::DISCONNECT] ?? null);
$this->server->on('disconnect', [$reflect, 'onDisconnect']);
}
$reflect->setEvents(Constant::CLOSE, $settings['events'][Constant::CLOSE] ?? null);
$this->server->on('close', [$reflect, 'onClose']);
}
/**
* @param array $events
* @throws NotFindClassException
-1
View File
@@ -32,7 +32,6 @@ class WebSocketServerListener extends Abstracts\Server
* @param int $mode
* @param array|null $settings
* @return Server\Port
* @throws NotFindClassException
* @throws ReflectionException
* @throws Exception
*/