-
Notifications
You must be signed in to change notification settings - Fork 348
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
Fix refresh listen #789
base: master
Are you sure you want to change the base?
Fix refresh listen #789
Conversation
add rpc reconnect chan
executeConfigListen when rpc client reconnect
当网络出现异常,例如客户端和服务端网络中断2分钟,期间服务端配置发生变更,在网络恢复之后,客户端并没有及时发送ConfigBatchListenRequest,导致客户端配置会出现分钟级的延迟 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -448,6 +449,7 @@ func (r *RpcClient) reconnect(serverInfo ServerInfo, onRequestFail bool) { | |||
r.currentConnection = connectionNew | |||
atomic.StoreInt32((*int32)(&r.rpcClientStatus), (int32)(RUNNING)) | |||
r.notifyConnectionChange(CONNECTED) | |||
ReconnectionChan <- struct{}{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
也许不需要ReconnectionChan,可以看下在notifyConnectionChange中实现IConnectionEventListener接口。
executeConfigListen when rpc client reconnect