We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
执行代码
Gateway::$registerAddress = "{$host}:{$port}"; echo "register=", Gateway::$registerAddress, PHP_EOL; while(true) { var_dump([ 'Gateway::getAllUidCount()' => Gateway::getAllUidCount(), 'getClientIdByUid' => Gateway::getClientIdByUid('123'), ]); sleep(1); }
执行的日志
[centos@ip-172-20-4-112 GatewayWorker]$ php -f ./bin/demo.php register=127.0.0.1:1239 array(2) { ["Gateway::getAllUidCount()"]=> int(5) ["getClientIdByUid"]=> array(1) { [0]=> string(20) "000000000beb00000320" } } array(2) { ["Gateway::getAllUidCount()"]=> int(5) ["getClientIdByUid"]=> array(1) { [0]=> string(20) "000000000beb00000320" } } array(2) { ["Gateway::getAllUidCount()"]=> int(5) ["getClientIdByUid"]=> array(1) { [0]=> string(20) "000000000beb00000320" } } array(2) { ["Gateway::getAllUidCount()"]=> int(5) ["getClientIdByUid"]=> array(1) { [0]=> string(20) "000000000beb00000320" } } PHP Fatal error: Uncaught Exception: Gateway::getAllGatewayAddressesFromRegister() with registerAddress:"127.0.0.1:1239" return array ( ) in /www/wwwroot/GatewayWorker/vendor/workerman/gatewayclient/Gateway.php:1314 Stack trace: #0 /www/wwwroot/GatewayWorker/vendor/workerman/gatewayclient/Gateway.php(726): GatewayClient\Gateway::getAllGatewayAddressesFromRegister() #1 /www/wwwroot/GatewayWorker/vendor/workerman/gatewayclient/Gateway.php(701): GatewayClient\Gateway::getAllGatewayAddress() #2 /www/wwwroot/GatewayWorker/vendor/workerman/gatewayclient/Gateway.php(650): GatewayClient\Gateway::getBufferFromAllGateway() #3 /www/wwwroot/GatewayWorker/vendor/workerman/gatewayclient/Gateway.php(445): GatewayClient\Gateway::select() #4 /www/wwwroot/GatewayWorker/vendor/workerman/gatewayclient/Gateway.php(466): GatewayClient\Gateway::getAllUidList() #5 /www/wwwroot/GatewayWorker/bin/demo.php(26): GatewayClient\Gateway::getAllUidCount() #6 {main} thrown in /www/wwwroot/GatewayWorker/vendor/workerman/gatewayclient/Gateway.php on line 1314 Fatal error: Uncaught Exception: Gateway::getAllGatewayAddressesFromRegister() with registerAddress:"127.0.0.1:1239" return array ( ) in /www/wwwroot/GatewayWorker/vendor/workerman/gatewayclient/Gateway.php:1314 Stack trace: #0 /www/wwwroot/GatewayWorker/vendor/workerman/gatewayclient/Gateway.php(726): GatewayClient\Gateway::getAllGatewayAddressesFromRegister() #1 /www/wwwroot/GatewayWorker/vendor/workerman/gatewayclient/Gateway.php(701): GatewayClient\Gateway::getAllGatewayAddress() #2 /www/wwwroot/GatewayWorker/vendor/workerman/gatewayclient/Gateway.php(650): GatewayClient\Gateway::getBufferFromAllGateway() #3 /www/wwwroot/GatewayWorker/vendor/workerman/gatewayclient/Gateway.php(445): GatewayClient\Gateway::select() #4 /www/wwwroot/GatewayWorker/vendor/workerman/gatewayclient/Gateway.php(466): GatewayClient\Gateway::getAllUidList() #5 /www/wwwroot/GatewayWorker/bin/demo.php(26): GatewayClient\Gateway::getAllUidCount() #6 {main} thrown in /www/wwwroot/GatewayWorker/vendor/workerman/gatewayclient/Gateway.php on line 1314
有时候返回的数据是正常的, 有时候报错
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
运行ps auxf ,看下是不是启动了多个register进程。
No branches or pull requests
执行代码
执行的日志
有时候返回的数据是正常的, 有时候报错
The text was updated successfully, but these errors were encountered: