3.5.12时不时的会收到这个错误

spridu
PHP Fatal error:  Uncaught exception 'Exception' with message 'You can't send(NULL) to client, you need to convert it to a string. ' in /data/socket.io/vendor/workerman/workerman/Protocols/Websocket.php:236
Stack trace:
#0 /data/socket.io/vendor/workerman/workerman/Connection/TcpConnection.php(336): Workerman\Protocols\Websocket::encode(NULL, Object(Workerman\Connection\TcpConnection))
#1 /data/socket.io/vendor/workerman/workerman/Protocols/Websocket.php(167): Workerman\Connection\TcpConnection->send(NULL)
#2 /data/socket.io/vendor/workerman/workerman/Connection/TcpConnection.php(608): Workerman\Protocols\Websocket::input('\x89\x80\x0E\xBB[O', Object(Workerman\Connection\TcpConnection))
#3 : Workerman\Connection\TcpConnection->baseRead(Resource id #59)
#4 /data/socket.io/vendor/react/event-loop/src/StreamSelectLoop.php(238): call_user_func(Array, Resource id #59)
#5 /data/socket.io/vendor/react/event-loop/src/StreamSelectLoop.php(205): React\EventLoop\StreamSelectLoop->waitForStreamActivity(10028784)
#6 /dat in /data/socket.io/vendor/workerman/workerman/Protocols/Websocket.php on line 236

安卓客户端有使用ping 但是ping没有附加任何参数,也就是没有发{"type":"ping"},每当客户端要主动发ping的时候就会出现在这个错误。我也不知道到底哪里错了。

2725 1 0
1个回答

walkor 打赏

更新workerman到3.5.13试下

年代过于久远,无法发表回答
×
🔝