New issue
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
如何判断服务是否上线 #106
Comments
补充下,如果myYPrx已经在线的情况下,myYPrx->getEndpoint()能正常判断;不在线,会直接SIGSEGV出错 |
myYPrx->tars_ping(), 但是这个调用是同步的 |
@ruanshudong 好的,非常感谢 但是tars_ping()返回void,如何取回包判断呢 |
正常返回,不抛异常, 就表示服务已经启动, 并且能接受请求了, 你用的哪个版本的tarscpp ? |
最近的一个版本,应该是2.4.3 |
建议升级一个版本, 这个版本发现了一个bug, 应该正好影响: myYPrx->getEndpoint() |
好的,感谢 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
通信器获得代理:
Application::getCommunicator()->setProperty("locator", "tars.tarsregistry.QueryObj@tcp -h 172.25.1.10 -p 17890 -t 10000");
Application::getCommunicator()->stringToProxy("MicroXXX.YServer.ZObj", myYPrx);
如何判断myYPrx是否已上线?
尝试使用myYPrx->getEndpoint().empty()来判断,似乎不行,程序直接SIGSEGV退出了
tars版本2.4.3
The text was updated successfully, but these errors were encountered: