为什么我关闭客户端,服务端就回抛出异常

0

采用的wss


ArgumentCountError: Too few arguments to function {closure}(), 1 passed in /home/wwwroot/face/vendor/workerman/workerman/Connection/TcpConnection.php on line 931 and exactly 2 expected in /home/wwwroot/face/start.php:88
Stack trace:
#0 /home/wwwroot/face/vendor/workerman/workerman/Connection/TcpConnection.php(931): {closure}(Object(Workerman\Connection\TcpConnection))
#1 /home/wwwroot/face/vendor/workerman/workerman/Connection/TcpConnection.php(834): Workerman\Connection\TcpConnection->destroy()
#2 /home/wwwroot/face/vendor/workerman/workerman/Worker.php(2457): Workerman\Connection\TcpConnection->close()
#3 /home/wwwroot/face/vendor/workerman/workerman/Worker.php(1866): Workerman\Worker->stop()
#4 /home/wwwroot/face/vendor/workerman/workerman/Worker.php(1183): Workerman\Worker::stopAll()
#5 /home/wwwroot/face/vendor/workerman/workerman/Events/Select.php(162): Workerman\Worker::signalHandler(2)
#6 [internal function]: Workerman\Events\Select->signalHandler(2, Array)
#7 /home/wwwroot/face/vendor/workerman/workerman/Events/Select.php(261): pcntl_signal_dispatch()
#8 /home/wwwroot/face/vendor/workerman/workerman/Worker.php(2430): Workerman\Events\Select->loop()
#9 /home/wwwroot/face/vendor/workerman/workerman/Worker.php(1554): Workerman\Worker->run()
#10 /home/wwwroot/face/vendor/workerman/workerman/Worker.php(1384): Workerman\Worker::forkOneWorkerForLinux(Object(Workerman\Worker))
#11 /home/wwwroot/face/vendor/workerman/workerman/Worker.php(1358): Workerman\Worker::forkWorkersForLinux()
#12 /home/wwwroot/face/vendor/workerman/workerman/Worker.php(542): Workerman\Worker::forkWorkers()
#13 /home/wwwroot/face/start.php(92): Workerman\Worker::runAll()
#14 {main}
Workerman[start.php] stopping ...
worker[none:30077] exit with status 64000
Workerman[start.php] has been stopped
已邀请:

WilliamA

赞同来自: zeroone

你的 onClose 回调有问题。只能有一个参数,你写了两个吧

要回复问题请先登录注册