Closed pslxx closed 3 years ago
protected function isServerWebsocket(int $fd): bool
{
return array_key_exists(
'websocket_status',
$this->container->make(Server::class)
->connection_info($fd)
);
}
这个方法在判断是否为websocket的fd的时候,如果全局开启了socket ,那么正常的HTTP请求也会被认为是soket链接,然后会触发disconnect事件 理论上此处加上判断 websocket_status 的值判断
因为这个问题,导致我在处理disconnect的时候出现障碍
Make sure you read Issues Guideline and answer these questions before submitting your issue. Thanks! (Any non-English issues will be closed immediately.)
Please provide your PHP and Swoole version. (
php -v
andphp --ri swoole
) php:7.3.13 swoole:4.4.15Please provide your Laravel/Lumen version.
6.18
2.6
What did you do? If possible, provide a recipe for reproducing the error.
What did you expect to see?
What did you see instead?