modify plugin name

This commit is contained in:
2022-02-14 14:32:53 +08:00
parent 826dcb58e5
commit fce7551dc3
+3 -4
View File
@@ -51,13 +51,12 @@ class Server extends AbstractServer
/** /**
* @param \Swoole\Server $server
* @param int $fd * @param int $fd
*/ */
public function onClose(\Swoole\Server $server, int $fd): void public function onClose(int $fd): void
{ {
$clientInfo = $server->getClientInfo($fd); $collector = $this->getContainer()->get(Sender::class);
if (!isset($clientInfo['websocket_status'])) { if (!$collector->isEstablished($fd)) {
return; return;
} }
if ($this->callback instanceof OnCloseInterface) { if ($this->callback instanceof OnCloseInterface) {