Revert "改名"
This reverts commit fdf58326
This commit is contained in:
@@ -8,7 +8,6 @@ class Sender
|
|||||||
|
|
||||||
public function push($fd, $data)
|
public function push($fd, $data)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,10 @@ class Server extends AbstractServer implements OnHandshakeInterface, OnMessageIn
|
|||||||
*/
|
*/
|
||||||
public function onClose(\Swoole\Server $server, int $fd): void
|
public function onClose(\Swoole\Server $server, int $fd): void
|
||||||
{
|
{
|
||||||
|
$clientInfo = $server->getClientInfo($fd);
|
||||||
|
if (!isset($clientInfo['websocket_status'])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ($this->callback instanceof OnCloseInterface) {
|
if ($this->callback instanceof OnCloseInterface) {
|
||||||
$this->callback->onClose($server, $fd);
|
$this->callback->onClose($server, $fd);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user