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

Fix refresh listen #789

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tclxjing8-li
Copy link

executeConfigListen when rpc client reconnect

add rpc reconnect chan
executeConfigListen when rpc client reconnect
@CLAassistant
Copy link

CLAassistant commented Dec 31, 2024

CLA assistant check
All committers have signed the CLA.

@tclxjing8-li
Copy link
Author

当网络出现异常,例如客户端和服务端网络中断2分钟,期间服务端配置发生变更,在网络恢复之后,客户端并没有及时发送ConfigBatchListenRequest,导致客户端配置会出现分钟级的延迟

Copy link
Member

@binbin0325 binbin0325 left a 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{}{}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

也许不需要ReconnectionChan,可以看下在notifyConnectionChange中实现IConnectionEventListener接口。

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

Successfully merging this pull request may close these issues.

3 participants