workbunny / webman-push-server

🚀🐇 Webman plugin for push server implementation.
https://www.workerman.net/plugin/102
MIT License
58 stars 9 forks source link

心跳机制循环方法内_getConnectionProperty的引用错误 #2

Closed sunsgneayo closed 1 year ago

sunsgneayo commented 1 year ago

Argument 1 passed to Workbunny\WebmanPushServer\Server::_getConnectionProperty() must be an instance of Workerman\Connection\TcpConnection, array, called in /var/www/fj-oh/vendor/workbunny/webman-push -server/src/Server.php on line 442 and defined in /var/www/fj-oh/vendor/workbunny/webman-push-server/src/Server.php:327

sunsgneayo commented 1 year ago

目前我的解决方案: if (($count = $this->_getConnectionProperty( (Object)$connection, 'clientNotSendPingCount' , 0 ) ) > 1) { $connection->destroy(); } $this->_setConnectionProperty((Object)$connection, 'clientNotSendPingCount', $count + 1); 移除_getConnectionProperty与_setConnectionProperty connection的TcpConnection