改名
This commit is contained in:
@@ -26,11 +26,13 @@ class OnConnect extends Callback
|
|||||||
public function onHandler(Server $server, int $fd, int $reactorId)
|
public function onHandler(Server $server, int $fd, int $reactorId)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
defer(fn() => fire(Event::SYSTEM_RESOURCE_RELEASES));
|
defer(fn() => fire(Event::SYSTEM_RESOURCE_RELEASES));
|
||||||
|
|
||||||
if (($clientInfo = $server->getClientInfo($fd, $reactorId)) === false) {
|
if (($clientInfo = $server->getClientInfo($fd, $reactorId)) === false) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (isset($clientInfo['websocket_status'])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
fire($this->getName($clientInfo), [$server, $fd, $reactorId]);
|
fire($this->getName($clientInfo), [$server, $fd, $reactorId]);
|
||||||
} catch (\Throwable $throwable) {
|
} catch (\Throwable $throwable) {
|
||||||
$this->addError($throwable, 'connect');
|
$this->addError($throwable, 'connect');
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ class Connection extends Pool
|
|||||||
* @param bool $isMaster
|
* @param bool $isMaster
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function disconnect($coroutineName, $isMaster = false)
|
public function disconnect($coroutineName, bool $isMaster = false)
|
||||||
{
|
{
|
||||||
$coroutineName = $this->name($coroutineName, $isMaster);
|
$coroutineName = $this->name($coroutineName, $isMaster);
|
||||||
$this->clean($coroutineName);
|
$this->clean($coroutineName);
|
||||||
|
|||||||
Reference in New Issue
Block a user