Skip to content
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

cluster模式,s.RPC通讯不能获取到另一个服务的错误 #80

Open
lwelcom opened this issue Aug 23, 2021 · 2 comments
Open

cluster模式,s.RPC通讯不能获取到另一个服务的错误 #80

lwelcom opened this issue Aug 23, 2021 · 2 comments
Labels

Comments

@lwelcom
Copy link

lwelcom commented Aug 23, 2021

Question

示例网关节点服务A:
err := s.RPC("TopicService.NewUser", request)
fmt.Println(err,"-------------------err")
if err != nil {
return errors.Trace(err)
}

Master节点服务B:
func (ts *TopicService) NewUser(s *session.Session, msg *protocol.NewUserRequest) error {
fmt.Println("---------------NewUser err")
return errors.Trace(errors.New("------------------123 err return"))

问题:服务B不管是关闭进程还是正常返回错误,服务A的s.RPC调用后err永远是nil

@lwelcom
Copy link
Author

lwelcom commented Aug 23, 2021

image

a.rpcHandler(a.session, msg, true)
问题在于这个rpc是一个go异步回调函数,并没返回值

@lonng
Copy link
Owner

lonng commented Aug 28, 2021

@lwelcom Can you submit a pull request to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants