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

netty的长连接是否会考虑重连机制 #4

Open
xingguang2013 opened this issue Apr 17, 2017 · 3 comments
Open

netty的长连接是否会考虑重连机制 #4

xingguang2013 opened this issue Apr 17, 2017 · 3 comments

Comments

@xingguang2013
Copy link

看代码是没有对netty的长连接有重连机制,后续是否会考虑?

@tang-jie
Copy link
Owner

tang-jie commented May 4, 2017

谢谢支持。最新的NettyRPC 2.2版本引入了重连机制。可以看下2.2版本的更新说明。

@xingguang2013
Copy link
Author

好的,非常感谢作者

@xingguang2013
Copy link
Author

看了重连部分的代码,在客户端MessageSendInitializeTask连接服务端时,如果发现服务端链接建立不成功就进行重连,这种场景只有在客户端初始化连接服务端的时候,才会触发。建议还需要在客户端连接到服务端后,此时服务端down掉后,在客户端Handler相关类的channelInactive方法中感知到服务端连接异常,并进行重连。

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

No branches or pull requests

2 participants