提交 f09fc679 编写于 作者: weixin_47267244's avatar weixin_47267244

修复 Swoole 服务器事件类型声明

上级 31c0dc29
......@@ -171,7 +171,7 @@ class Server extends Base implements ISwooleWebSocketServer
if ($event = ($events['message'] ?? true))
{
$this->swoolePort->on('message', \is_callable($event) ? $event : function (WebSocketServer $server, \Swoole\WebSocket\Frame $frame) {
$this->swoolePort->on('message', \is_callable($event) ? $event : function (\Swoole\Server $server, \Swoole\WebSocket\Frame $frame) {
try
{
if (!Worker::isInited())
......@@ -285,7 +285,7 @@ class Server extends Base implements ISwooleWebSocketServer
if ($event = ($events['disconnect'] ?? true))
{
$this->swoolePort->on('disconnect', \is_callable($event) ? $event : function (WebSocketServer $server, int $fd) {
$this->swoolePort->on('disconnect', \is_callable($event) ? $event : function (\Swoole\Server $server, int $fd) {
try
{
RequestContext::muiltiSet([
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册